Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Start using Swift.

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →
DAloG
January 14, 2016

Start using Swift.

DAloG

January 14, 2016

Transcript

39 slides
  1. Why? ✤ Strong types —> Less errors ✤ More instruments

    —> Cleaner code ✤ Better syntax —> Easy to read and write
  2. WTF Immutability. ✤ Reference and Value types ✤ let -

    immutable name ✤ var - mutable name
  3. Struct trickery ✤ How many objects will be created? ✤

    How many times `print` will write? ✤ What `t1.b` will print?
  4. Class trickery ✤ How many objects will be created? ✤

    How many times `print` will write? ✤ What `t1.b` will print?
  5. Properties ✤ no setter / getter methods. ✤ …unless `dynamic`

    is specified ✤ `willSet` / `didSet` with references to new/old values ✤ `public private(set) var …` is ok
  6. Outro ✤ Run away from Obj-C ✤ Build your own

    logic modules ✤ Use Value Types ✤ Don’t use generics + inheritance + UIKit

More Decks by DAloG

Other Decks in Programming