Mike Ash goes into detail on the current implementation of weak references and how it compares the old implementation back when Swift was first open-sourced. I find his explanation of side tables and their benefits quite enlightening. The possibility of seeing stored properties in extensions and other great new features is pretty exciting! 😎
Since moving over to Swift, I've been building up the habit of using switch statements in place of lengthy chained if-statements when possible (within reason of course). The beauty of this is that in addition to all the great benefits provided by
switch statements, Swift allows us to switch on tuples, sets, comparisons, and more. Ultimately, they allow us to make our code easier to read & reason about.
Keith Harrison with notes on the latest changes to
String in Swift 4. If you've worked with substrings, character counts, and character looping, you'll find these new simplifications quite handy. As always, you'll find some great examples, explanations and of course, a swift string cheat sheet.