$30 off During Our Annual Pro Sale. View Details »

Journey to Swift

Journey to Swift

A Talk that I gave at the Developer User group Johannesburg

Peter-John Welcome

May 09, 2017
Tweet

More Decks by Peter-John Welcome

Other Decks in Technology

Transcript

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

    View Slide

  2. Objective C
    Was born in 1984
    Old school C style language (header files)

    View Slide

  3. Swift
    Was born in 2014
    Modern, beautiful, magical language

    View Slide

  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

    View Slide

  5. The Journey
    ● Interoperability - bridging
    ● Big objective C code base (so you would want to reuse some of that code)

    View Slide

  6. Code
    The Journey

    View Slide

  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

    View Slide

  8. The Journey
    The Journey
    Advantages to Interoperability/Swift
    ● Less boilerplate code
    ● Functions are 1st class citizens
    ● Functional programming paradigm
    ● Protocol Oriented Programming

    View Slide

  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

    View Slide

  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

    View Slide

  11. Advice
    The Journey

    View Slide

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

    View Slide