the programmer language,

Jun 10, 2014
How Apple failed miserably to get us closer to the Moon: What's wrong with Swift?

A few days ago Apple unveiled a new programming language of their own: Swift. As I see it, it is a great step up for developers of the Apple platforms (iOS and OSX). Compared to Objective-C, it seems like a fairly modern language with a nice compromise between safety and expressiveness. Apple seemed to give special attention to its tooling and user experience (its so-called Interactive Playgrounds). All developers for the Apple platforms should be seriously excited.

However, the announcement of Swift made me upset for other reasons. This post is an attempt to structure my thoughts and explain what made me upset and why.

First of all, my logic stems from a dogmatic principle I hold. That principle is:

All corporations, big or small, have a moral imperative to advance the state of the art of their industry. The bigger the corporation, the more absolute resources it is expected to dedicate to that end. This makes leading corporations in a given industry very likely to direct the most significant paradigm shifts in it.

Humans on the moon

I took this analogy from an article about the development of AI technology, and liberally adapted it. Unfortunately I don't remember what the original article was anymore. Let me know if you do.

Let's imagine that putting a human on the moon is a big deal for human advancement (and let's ignore that it already happened). Let's imagine as well that there's a big corporation who has the resources and the talent to figure out how to do it. We will call this fictional corporation Happle.

Taking the dogmatic principle I stated earlier as truth, we can say that Happle has a moral imperative to try to put a human on the moon. There are at least two ways Happle can fail to fulfill that moral imperative. It can either choose to ignore it, or (even worse) deceptively pursue a shorter-term goal instead, marketing it as if it was an attempt to put a human in the moon.

Doing the former is common among some corporations whose goals dismiss long-term thinking in favor of shorter-term ROI.

Choosing the latter, however (masking a short-term goal as a long-term, game-changing endeavor) is pure evil, and is motivated only by self-aggrandizing brand marketing. Let's imagine a scenario where our fictional Happle chose to pursue this path.

Wooden crates

Imagine that Happle presents its latest product: a beautifully designed wooden crate. Dozens of possibilites come to mind quickly with this new product: people can pile a few of those crates, stand on them and reach the higher walls of their 2-floor houses to paint them. It's great! The wood Happle chose for their product is the best of breed, and their varnish is a patented formula that even the most woodworkers can only dream of.

It's all good until you see the advertisement on Youtube, featuring a middle-aged man piling a bunch of crates up to a few meters high, then standing on top of it. Then the product motto appears:

A little bit closer to the moon.

Back to Apple

Returning from the analogy, Swift is the beautiful wooden crate and its broad spectrum of usefulness. Even though it is a good tool, much better than many present mainstream programming languages, it is not "a product of the latest research in programming languages". It doesn't bring us any closer to the moon. You just can't keep piling wooden crates on top of each other until you reach the moon -- you need to dedicate millions of research in physics and engineering.

Then again, a good tool is a good tool, and I'd be glad if any developer like me or my friends had developed and marketed it as what it is. However it didn't take me even 5 minutes reading the Swift guide until I found an example of a for loop mutating a counter, which made it look like any other Algol-derived programming language from the 80s or the 90s.

Swift is just a better hammer. It doesn't represent a new class of tools. It doesn't reshape the way we think about programming as a whole or even an area of programming, as we should expect from a new tool developed by such a powerful industry leader.

Sadly, Apple isn't the only would-be world-changer to leave us cold. Facebook and Google's Hack and Go are also just better hammers. And people love having better hammers for their nails. But as long as the expectations of our industry remain this low, a paradigm shift is not likely to occur.

If Apple, Google and Facebook spend their resources and talent as industry leaders in making better hammers and more beautiful wooden crates, how are we ever going to reach the moon?

(Big thanks to Chad Fowler for proofreading and feedback on this article!)