Start using Swift.

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on. →
DAloG
January 14, 2016

Start using Swift.

DAloG

January 14, 2016

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

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