What's New in Swift 4.2
The second update release to Swift of 2018, Swift 4.2 introduces some great improvements to the language. Read this post to learn how they can help you write even better code.
Included in this version’s list of improvements:
SE-0194: Adds the
CaseIterableprotocol to automatically generate an array of all the possible enum cases.
SE-0195: Dynamic member lookup syntactical sugar.
SE-0196: New compiler directives
removeAll(where:)method to perform optimized in-place filter for collections.
toggle()method to easily toggle/flip boolean values.
SE-0202: New native random number generator.
Hashertype to improve and simplify conformance to the
allSatisfy()method to verify all elements in a sequence pass a condition.
SE-0194: Conditional conformance improvements.
Read my take on each of those changes, exclusively at Tuts+.