This blog has been archived. Our writing has moved to makandra cards.
The blog of , a Ruby on Rails development team

Swift is not my favorite language

I really wanted to like Swift. In a world that has settled on Javascript, an ambitious language design is a rare treat. And all the money we gave to Apple should buy us a decent language.

So five years after iOS has killed Adobe Flash, Apple releases a language that looks and feels remarkably like ActionScript 3. Just like ActionScript, Swift is locked behind a $1000 paywall. Instead of bindings to proprietary stuff from Adobe it has bindings to proprietary stuff from Apple.

Some observations from my armchair, in no particular order:

Generics: It will be so much fun to watch a generation of Internet hipsters crash into the wall of complexity that is generics. The survivors will learn that you can't have an expressive type system without being Scala. And I'm not sure you want to be Scala.

Explicit null: Language tourists all over the planet are praising Apple for including optional values. This is such a horrible solution to a much deeper problem. Remember how when Java introduced checked exceptions and everyone said this would force people to handle their errors? What it got us was was empty catch clauses and everyone going back to unchecked exceptions. The same fallacy has now brought you optional values.

You can't make this issue go away with language design. You don't have a language problem, you have an API problem and an education problem. Why did anyone feel it was OK to pass or return null? The clueless developer who passed you the null in the first place will now pepper your code with exclamation marks to make the funny compiler errors go away. Enjoy.

Inconsistencies: So a language that prides itself on not doing implicit conversions (because safety) does auto-unwrap arrays during concatenation. This will ruin so many lives.

Name conflict: What really gets my blood boiling is that there already is a programming language that is called Swift. Imagine waking up one morning only to discover that someone with more money took your name and will bully you out of Google forever. I had this happen to me and it sucks. Open Source maintenance is the most thankless job on the planet and this is just a big fuck you in the face of everyone who spends their weekends working on free software.

I don't know what's more infuriating: That Apple couldn't be bothered to run a stupid Google search before deciding on the name or that they did run that search and went ahead anyway. There's still one classy move they can take to fix things, but I doubt that the issue even registers when you're sitting on a mountain of money.

In a nutshell:

  • There are now two languages called Swift
  • One has semicolons
  • Both are better than Objective-C
Growing Rails Applications in Practice
Check out our e-book:
Learn to structure large Ruby on Rails codebases with the tools you already know and love.

Recent posts

Our address:
makandra GmbH
Werner-von-Siemens-Str. 6
86159 Augsburg
Germany
Contact us:
+49 821 58866 180
info@makandra.de
Commercial register court:
Augsburg Municipal Court
Register number:
HRB 24202
Sales tax identification number:
DE243555898
Chief executive officers:
Henning Koch
Thomas Eisenbarth