And now that we’ve got our apps all compatible with this year’s OS and devices — you have, haven’t you? — time to take a closer look at all the goodies in the latest Swift that people have been discovering since WWDC, now that it’s official and all:
Swift 4.2 is now officially released! Swift 4.2 builds on the strengths of Swift 4, delivering faster compile times, improving the debugging experience, updating the standard library, and converging on binary compatibility.
… With the completion of conditional conformance support, Swift 4.2 makes significant progress in implementing the vision of generics in the language. Watch the Swift Generics WWDC 2018 presentation for more details.
Check out those shows for sure, and read the whole thing if you want the nitty-gritty of all the implemented swift-evolution proposals, or you could just skip straight to
Alllegedly the Xcode migrator should take care of pretty much everything, but it choked a lot for us. YMMV. Either way, not a lot of breaking changes you’re likely to find; aside from some minor renaming, check out Upgrading To Swift 4.2 for discussion, most everything new is additive —
— and, as always, check out What’s new in Swift? for a quick and easy reference between the versions of your choice —
— personally, our ABOUT TIME! award goes to Swift Diagnostics: #warning and #error. Good riddance, parsing scripts!
Although it’s a very close runner up for Synthesized conditional conformances in Swift 4.2. It’s just automagic!
Overdue conveniences out of the way, likely the biggest immediate aid to our coding is CaseIterable, which contrary to what the name might lead you to expect isn’t just for enums but for any type with a finite number of values: check out Enumerating enum cases in Swift for details.
Now, the biggie in terms of power, and in generating powerful opinions shall we say? centerpiece feature:
On the one hand, this is definitely an “enough rope to shoot yourself in the head” kind of feature, on the other hand, Swift’s chances of ever becoming more than an Apple ghetto are enhanced significantly with this, so we figure you should all be cheering for the future job prospects! For more on this, check out
And while we’re speaking dynamically and all, over at Chez Wenderlich there’s an excellent overview of Dynamic Features in Swift up to and including this latest.
That’s about it for majorly interesting new stuff, but there’s some more interesting details, check out:
Ole Begemann’s above-referenced Playground: What’s new in Swift 4.2
And for yet another — come on people, we can do a creative name — Ray Wenderlich has a What’s New in Swift 4.2 three.
Michael Tsai’s Swift 4.2 Released
Finally, if you really want to get ahead of the game … check out What’s new in Swift 5.0!