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?
Well if you ask the folks at Apple, they will probably direct you to this page on their website. This is a comprehensive guide on how to implement them in your app.
In Swift Development, we usually use a TODO comment as a placeholder for future refactor. However, Xcode cannot remind us for warning or error messages like this scenario.
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.
Swift lends itself well to functional programming, but Swift is not necessarily a functional language. We are free to choose the style of programming that best matches our style and requirements.