Generics are one of the features of Swift that set it apart from many other languages. Since Swift debuted, developers have been wondering when to use them and what to use them for. By looking at the standard library, which is the first piece of software to use generics, we can better understand their purpose and utility.
In this talk, Karoly describes several ways to implement the same simple ordered set protocol in Swift, demonstrating how the language supports a number of surprisingly different approaches to programming. At every step, we trade extra complexity for improved runtime performance, ending on an implementation that is ludicrously fast but also quite difficult to handle.
In the Objective-C kingdom, the evil Queen NSObject was reigning over her people by keeping them under the control of the inheritance chains. But one day, a Swift wizard named Christobald came to create a new kingdom next to the Queen’s. The war between the two kingdoms was ongoing for several years when the wizard suddenly left...
Swift introduces new ways to model data through value types like structs and enums. Drew discusses his experiences rewriting the data model of the vector graphics app Sketch to use value trees, and finishes off pondering whether future data modelling frameworks could be based on value trees, rather than entities and relationships. To that end, he also introduces the experimental project Impeller https://github.com/mentalfaculty/impeller.