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

Swift 4

Bas Broek
February 15, 2017

Swift 4

We will be taking a look at the two stages in which Swift 4.0 will be developed and what we can expect from that. We will also take a look at the evolution proposals that are awaiting us in Stage 2.

This talk was presented at CocoaHeads NL.

Bas Broek

February 15, 2017
Tweet

More Decks by Bas Broek

Other Decks in Programming

Transcript

  1. SWIFT �
    BAS BROEK
    @BASTHOMAS
    1

    View Slide

  2. SWIFT ɣ
    BAS BROEK
    @BASTHOMAS
    2

    View Slide

  3. EXPECTED RELEASE DATE:
    LATE 2017
    3

    View Slide

  4. STAGE 1 & 2
    4

    View Slide

  5. STAGE 1
    5

    View Slide

  6. STRINGS
    6

    View Slide

  7. !
    7

    View Slide

  8. NO
    8

    View Slide

  9. STRINGS IN SWIFT 4
    RE-EVALUATE THE API1
    2 Localization & internationalization itself are planned for Swift 5
    1 https://github.com/apple/swift/blob/master/docs/StringManifesto.md
    9

    View Slide

  10. STRINGS IN SWIFT 4
    RE-EVALUATE THE API1
    > How to use internationalization API's correctly2
    2 Localization & internationalization itself are planned for Swift 5
    1 https://github.com/apple/swift/blob/master/docs/StringManifesto.md
    9

    View Slide

  11. STRINGS IN SWIFT 4
    RE-EVALUATE THE API1
    > How to use internationalization API's correctly2
    > Better unicode support
    2 Localization & internationalization itself are planned for Swift 5
    1 https://github.com/apple/swift/blob/master/docs/StringManifesto.md
    9

    View Slide

  12. STRINGS IN SWIFT 4
    RE-EVALUATE THE API1
    > How to use internationalization API's correctly2
    > Better unicode support
    > No more .characters for most operations
    2 Localization & internationalization itself are planned for Swift 5
    1 https://github.com/apple/swift/blob/master/docs/StringManifesto.md
    9

    View Slide

  13. STRINGS IN SWIFT 4
    RE-EVALUATE THE API1
    > How to use internationalization API's correctly2
    > Better unicode support
    > No more .characters for most operations
    > Supporting Range in favor of NSRange
    2 Localization & internationalization itself are planned for Swift 5
    1 https://github.com/apple/swift/blob/master/docs/StringManifesto.md
    9

    View Slide

  14. STRINGS IN SWIFT 4
    RE-EVALUATE THE API1
    > How to use internationalization API's correctly2
    > Better unicode support
    > No more .characters for most operations
    > Supporting Range in favor of NSRange
    > Improved string interpolation & formatting
    2 Localization & internationalization itself are planned for Swift 5
    1 https://github.com/apple/swift/blob/master/docs/StringManifesto.md
    9

    View Slide

  15. STRINGS IN SWIFT 4
    RE-EVALUATE THE API1
    > How to use internationalization API's correctly2
    > Better unicode support
    > No more .characters for most operations
    > Supporting Range in favor of NSRange
    > Improved string interpolation & formatting
    > Regex
    2 Localization & internationalization itself are planned for Swift 5
    1 https://github.com/apple/swift/blob/master/docs/StringManifesto.md
    9

    View Slide

  16. !
    10

    View Slide

  17. !
    11

    View Slide

  18. WHAT ABOUT SOURCE STABILITY?
    12

    View Slide

  19. SE-01413 TO THE RESCUE
    @available(swift 4, *)
    extension Collection {
    func index(offset: IndexDistance) -> Index {
    return index(startIndex, offsetBy: offset)
    }
    func offset(of i: Index) -> IndexDistance {
    return distance(from: startIndex, to: i)
    }
    }
    3 https://github.com/apple/swift-evolution/blob/master/proposals/0141-available-by-swift-version.md
    13

    View Slide

  20. !
    14

    View Slide

  21. STAGE 2
    "SOME TIME IN SPRING 2017"
    15

    View Slide

  22. SWIFT-EVOLUTION4
    4 https://apple.github.io/swift-evolution/
    16

    View Slide

  23. WHAT IS UPON US?5
    5 https://github.com/apple/swift-evolution/pulls?
    utf8=✓&q=label%3A%22out%20of%20scope%20for%20current%20release%22
    17

    View Slide

  24. WHAT IS UPON US?5
    > Enforce calling super
    5 https://github.com/apple/swift-evolution/pulls?
    utf8=✓&q=label%3A%22out%20of%20scope%20for%20current%20release%22
    17

    View Slide

  25. WHAT IS UPON US?5
    > Enforce calling super
    > Multi-line string literals
    5 https://github.com/apple/swift-evolution/pulls?
    utf8=✓&q=label%3A%22out%20of%20scope%20for%20current%20release%22
    17

    View Slide

  26. WHAT IS UPON US?5
    > Enforce calling super
    > Multi-line string literals
    > User-provided warning diagnostics at compile time
    5 https://github.com/apple/swift-evolution/pulls?
    utf8=✓&q=label%3A%22out%20of%20scope%20for%20current%20release%22
    17

    View Slide

  27. WHAT IS UPON US?5
    > Enforce calling super
    > Multi-line string literals
    > User-provided warning diagnostics at compile time
    > The pipeline (|>) operator
    5 https://github.com/apple/swift-evolution/pulls?
    utf8=✓&q=label%3A%22out%20of%20scope%20for%20current%20release%22
    17

    View Slide

  28. WHAT IS UPON US?5
    > Enforce calling super
    > Multi-line string literals
    > User-provided warning diagnostics at compile time
    > The pipeline (|>) operator
    > Increased Objective-C & Swift interoperability
    5 https://github.com/apple/swift-evolution/pulls?
    utf8=✓&q=label%3A%22out%20of%20scope%20for%20current%20release%22
    17

    View Slide

  29. WHAT IS UPON US?5
    > Enforce calling super
    > Multi-line string literals
    > User-provided warning diagnostics at compile time
    > The pipeline (|>) operator
    > Increased Objective-C & Swift interoperability
    > Much more once Stage 2 starts...
    5 https://github.com/apple/swift-evolution/pulls?
    utf8=✓&q=label%3A%22out%20of%20scope%20for%20current%20release%22
    17

    View Slide

  30. AND OF COURSE...
    7 https://github.com/swift-server
    6 https://lists.swift.org/pipermail/swift-evolution-announce/2017-January/000307.html
    18

    View Slide

  31. AND OF COURSE...
    > Swift Package Manager improvements6
    7 https://github.com/swift-server
    6 https://lists.swift.org/pipermail/swift-evolution-announce/2017-January/000307.html
    18

    View Slide

  32. AND OF COURSE...
    > Swift Package Manager improvements6
    > Swift on the server7
    7 https://github.com/swift-server
    6 https://lists.swift.org/pipermail/swift-evolution-announce/2017-January/000307.html
    18

    View Slide

  33. AND OF COURSE...
    > Swift Package Manager improvements6
    > Swift on the server7
    > ???
    7 https://github.com/swift-server
    6 https://lists.swift.org/pipermail/swift-evolution-announce/2017-January/000307.html
    18

    View Slide

  34. WORLD
    DOMINATION
    19

    View Slide

  35. @BASTHOMAS
    @SWIFTLYBRIEF8
    8 https://swiftweekly.github.io
    20

    View Slide