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

Journey to Swift

Journey to Swift

A Talk that I gave at the Developer User group Johannesburg

7cfaab5ac5113201604c3ad16d9a293b?s=128

Peter-John Welcome

May 09, 2017
Tweet

Transcript

  1. Journey to Swift Peter-John Welcome google.com/+PeterJohnWelcome

  2. Objective C Was born in 1984 Old school C style

    language (header files)
  3. Swift Was born in 2014 Modern, beautiful, magical language

  4. The Journey • Moving from Monolithic app to having frameworks

    (pods) • Reduces compilation times due to incremental builds • decouple your code, helps with Unit tests
  5. The Journey • Interoperability - bridging • Big objective C

    code base (so you would want to reuse some of that code)
  6. Code The Journey

  7. The Journey Disadvantages to Interoperability • Developers need to know

    2 languages • Xcode is buggy ( refactoring , debugging , Code completion) • Swift is a Static dispatcher - no reflection =( • Swift embedded Libraries (app bloat) • 3rd Party library problems • Code Standards • AppCode did not have great support
  8. The Journey The Journey Advantages to Interoperability/Swift • Less boilerplate

    code • Functions are 1st class citizens • Functional programming paradigm • Protocol Oriented Programming
  9. • Generics • Tuples • Enumerations defined in Swift without

    Int raw value type • Structures defined in Swift • Top-level functions defined in Swift • Global variables defined in Swift • Typealiases defined in Swift • Swift-style variadics • Nested types • Curried functions The Journey Swift Types
  10. The Journey • https://medium.com/standard-bank/getting-swift-3-compatibility-in-a-large-objective-c-codebase-7ac 9f0bc81b5 • https://medium.com/google-developers/migrating-from-objective-c-to-swift-googlecast-reference-app -81030ce814ce • https://www.skilled.io/u/keithsmiley/tales-of-a-rewrite-at-lyft

    Resources
  11. Advice The Journey

  12. Thanks! Contact me: google.com/u/0/+PeterJohnWelcome @pjapplez pjwelcome@gmail.com Peter-johnwelcome.co.za https://github.com/pjwelcome