Swift 4.1 has been released, and as you can see from the release announcement, there are many important user-visible improvements, including conditional conformances, a new -Osize optimization mode, and a much more.

In this post, I wanted to focus on a few smaller, less visible improvements, which are nonetheless interesting and important to document. These improvements fall somewhere between new features and bug fixes. Some of them have no user-visible impact at all. Others address long-standing problems or lay the groundwork for future language enhancements.

The below descriptions will get rather technical at times, and also I’m sure some of my explanations are unclear. Diagrams would probably help in some cases. If anything doesn’t make sense, don’t hesitate to reach out; I’m @slava_pestov on Twitter. …

In the previous installment, I gave an overview of Swift’s formal type system, describing how types are represented in the AST. Now, let’s peel back a layer and dive into the type system of SIL, the Swift Intermediate Language. SIL adds a layer of detail missing from formal types, drawing a distinction between values and addresses, and making function types more explicit by introducing explicit annotations for argument and return value conventions.

SIL is an intermediate language used by the Swift compiler, filling the gap between the AST and the LLVM IR. I cannot hope to give a complete description of SIL here; if you’re interested in learning more details, I suggesting starting with the following…

(Disclaimer: This is a post on my personal blog, not officially endorsed by Apple. It does not discuss any commitments to future plans, or official descriptions of anything we have done in the past. For that, see the Swift web site).

Being part of the Swift team has been very exciting for me since the open source release last December. When I joined Apple, I thought it would be great if the compiler were to be open sourced one day, but I did not really consider it a certainty when I went in for my interview and subsequently accepted the offer. …

Call it false nostalgia, but I find it fascinating to revisit older systems to see which parts they got right, which ones were comically short-sighted, as well as to see if they had any genuinely good but oddball ideas that fell by the wayside.

I learned programming in the early 90s, so the systems of that era defined what a computer is and how it should work for me. And while CPUs and memory were multiple orders of magnitude slower and smaller back then, things had progressed sufficiently at that point that all the major elements of modern computing had some kind of recognizable equivalent. …


Slava Pestov

Swift compiler hacker; http://twitter.com/slava_pestov

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store