Swift Evolution proposal SE-0195 is an attempt to bring Swift closer in behavior to scripting languages, but does so in a type-safe way – you don’t lose any of Swift’s safety, but you do gain the ability to write the kind of code you’re more likely to see in PHP and Python.
SE-0195 has been accepted after extensive review, and an implementation has already been written and submitted as a pull request. There’s a good chance it will be stable in time for Swift 5.0, but why wait?
One of the biggest challenges when working on a continuously evolving code base is to keep things nicely encapsulated. Adding new capabilities without leaking abstractions can be really tricky. This week, let's take a look at a few techniques that can let us define more clearly encapsulated APIs.