0%

Book Description

Swift 3 is the first significant release since Apple’s heralded programming language became an open source project in late 2015. In this report, Jon Manning, Paris Buttfield-Addison, and Tim Nugent—authors of Learning Swift—provide a tour of Swift 3 and its growing ecosystem. You’ll learn about the language’s most impactful and interesting new features, and explore Swift’s use on non-Apple platforms.

Many changes in Swift 3 are subtle refinements that knock the rough corners off the language, making human interactions with Swift much smoother. To help you gain a better understanding of Swift 3, the authors provide a simple program designed for one of Apple’s Swift Playgrounds.

  • Get a high-level view of Swift 3’s changes and new features, and learn how this version differs from Swift 2
  • Explore the Swift Evolution Process and the full list of accepted proposals—including those not yet implemented
  • Dive into Swift 3’s changes to the language’s syntax, standard library features, and other areas
  • Examine Swift 3’s use on the server, and use a simple program to learn about Swift’s use on Linux
  • Find further resources for learning about, working with, and converting projects to Swift 3

Table of Contents

  1. 1. Introduction
  2. 2. Understanding Swift 3
    1. The Swift Evolution Process
    2. So, Swift 3, then?
  3. 3. What’s Changed in Swift 3?
    1. Using the New Stuff
      1. The API Guidelines Are Applied to the Swift Standard Library
      2. The ++ and -- Operators Have Been Removed
      3. C-style for-loops Have Been Removed
      4. libdispatch Now Has a Swiftier API
      5. First Parameters in Functions Now Have Labels
      6. Foundation Types Are Now Imported as Swift Types
      7. Objective-C Lightweight Generic Types Are Imported as Swift Generic Types
      8. Function Parameters Are No Longer Variables, but Constants
      9. Selectors and Key Paths Are Now Type-Checked
      10. UpperCamelCase Has Become lowerCamelCase for Enums and Properties
      11. M_PI is now Float.pi
      12. Functions Can Be Marked as Having a Discardable Result
      13. Debugging Identifiers Have Been Made Nicer
    2. Putting It All Together
    3. Summary
  4. 4. Swift on the Server, and Swift on Linux
    1. Swift on Linux
      1. Installing Swift on Linux
      2. Using Swift on Linux
    2. A Working Example
    3. Kitura: A Web Framework for Swift
  5. 5. Conclusion
3.134.90.44