After seven years, I’m leaving Apple. Today (November 1) is my last day in office.
Those seven years have been good for me. I started off on the Clang Static Analyzer, and eventually moved onto the secret project that became Swift. As someone interested in programming languages and compilers, Swift was…I don’t want to say the chance of a lifetime, but maybe the chance of a decade, at least. I got to shape and contribute to a language used by people all over the world during its early years, and it’s been a heck of an experience. To everyone in the Swift community, thank you and also I’m sorry for the bugs.
If you browse through the Swift (or LLVM) codebase for a while, you’ll see a comment like this:
// FIXME: Dependencies should be de-duplicated at serialization time,
// not now.
My colleague Michael Ilseman shared a design problem with me today, which came down to something like this:
Today, we have a protocol RawRepresentable, which says that “if I have a type
X, I can convert it to and from
X.RawValue”. You can then make a whole host of types that use
Int as the raw value, and indeed that’s how Swift represents enums imported from Objective-C. (Well, those with an
NSInteger underlying type, at least.) That makes this, in some sense, a “many-to-one” relation, because many types can have the same one raw value type. But what you can’t do is make a single type have multiple
RawValue types—one of them has to claim the name