With WWDC around the corner (it starts in four days!), it is not that big of a surprise that these last two weeks have been pretty quiet when it comes to Swift.

Also, come and say hi at WWDC!

Swift Unwrapped

In episode 59, Jesse and JP discuss implicit escaping of closures, explaining in how they (should) work.

In episode 60, Jesse and JP discuss Character Properties, a proposal pitch that aims to increase the usefulness of Character and approachability of programming in Swift.

News and community

Michael Ilseman has improved string interpolation in Swift 4.2 to be at least twice as fast! πŸŽπŸ’¨

Commits and pull requests

Alex Hoppen merged a pull request that adds incremental syntax parsing to the Swift compiler. Cool!

Lily Vulcano merged a pull request to bridge as, as?, and as! to Linux. πŸŽ‰

Michael Gottesman opened a pull request to allow for benchmark testing on Linux.

Proposals in review

SE-0214: Renaming the DictionaryLiteral type to KeyValueList is under review.

This proposal renames the confusing and misnamed DictionaryLiteral type to KeyValueList. This type is neither a dictionary nor a literal. It is a list of key-value pairs.

There is no strong motivation to deprecate. The type does not produce active harm. Instead, it adds measurable (if small) utility and will be part of the ABI. A sensible renaming mitigates the most problematic issue with the type.

Swift Forums

Ben Cohen started a discussion to change part of SE-0202, renaming Random to DefaultRandomNumberGenerator.

SE-0202, as accepted, introduces a type, Random, as the default source of random numbers on each platform.

[..] the name Random for this default source is misleading, and would probably be better named DefaultRandomNumberGenerator.

One open question is the naming of the getter for an instance of the type. Currently it is Random.default. However, renaming Random leads to the rather clunky DefaultRandomNumberGenerator.default. Benjamin suggests .shared. However, in all current implementations, this is not strictly speaking a shared instance – it is instead a getter/setter for a fresh instance each time. This doesn’t actually have a cost, since the type has no actual size (the type is just a vehicle for calling an OS function), but needs to be done this way because using: is taken inout.

Any suggestions for better naming gratefully received.

Finally

Although not all may agree…