Welcome to objc.io issue 16!
One day after Apple’s iPhone and WATCH event, there’s a lot of new stuff to digest. But in addition to new hardware, Apple’s new programming language, Swift, went 1.0 yesterday. And that’s what this issue is all about.
The purpose of this issue is neither to give an introduction to Swift nor to present best practices when writing Cocoa/CocoaTouch apps with Swift. For the former, there is Apple’s documentation, and many other resources are coming up. Regarding the latter, the language is way too young, and none of us have had enough experience to confidently talk about best practices.
Instead, we’ll focus on some aspects of Swift that are new and potentially very foreign to Objective-C developers.
Chris starts off by showing us the power of Swift, highlighting some of his favorite parts of the new language. Andy takes a look at why you’d want to use structs and value types, even though classes have been the traditional unit of structure for so long. Natasha then enlightens us with everything about Swift functions, and Florian demonstrates how to leverage those first-class functions to build a functional API around Core image. Last but not least, Brad explains how he uses Swift playgrounds for rapid prototyping, providing an example of signal processing with the Accelerate framework.
If you’d like to dive deeper into the functional programming aspect of Swift, we’re currently in the process of finishing up our book, Functional Programming in Swift. It’s already available as an early-access version, and the final eBook will be published on October 1.
All the best from Berlin,
Chris, Daniel, and Florian.