Skip to main content

Mike Kreuzer

Programming anniversaries part 1: 10 years of Swift

5 June 2024

Ten years ago at Apple's WWDC, Swift was announced, & I was happy. Alas, that was a bit of a high point for Swift & it mostly went downhill from there. Not all the way down, but down.

Years of instability, years of either endless rewrites or code & ideas that were left to rot. The too many years Swift went without a canonical package manager or async code. Stability got a bit better again after a while, a long while, a few years at least later than Swift version one was declared, but it never got great, so neither did Swift. What seemed like really promising ideas once upon a time like playgrounds went nowhere as the focus kept shifting.

Giant amounts of time & effort were sucked into the vortex of an ever expanding language. A language to teach programming (except it's as complex as they come now), or for the server (almost nobody uses it there), or for embedded systems (lolz, with a standard library bigger than most embedded spaces), or even its own declarative UI. Swift got distracted by it all, & I along with it. And despite a lot of talk open source Swift hasn't yet really became a thing. Open source that isn't just Apple hand feeding the adoring masses that is. There are some bright lights though, Yonas Kolb's Mint & Stackotter's Swift Bundler & Swift Cross UI among them.

There is still a lot to like about Swift, but the build system is still terrible, & the frameworks that are built with it – especially the big brand name ones, the package manager, SwiftUI, & SwiftData – those are mostly half finished, at best, sometimes years after they're released. Promising, but not quite done has been Swift's curse from the beginning.

So every once in a while I dip into other languages that fill the same sort of niche, or niches because that seems to be the way. Every few months it seemed I'd dip into Rust for example. Most recently I took a rather deeper dive over the course of most of this year, trying out Rust for game development. Rust is a terrible language for game development. Probably a terrible language for any app with a GUI right now. Again there are things to like, but more things not to. Many more things than with Swift. Another developer wrote a long post that neatly sums up my thoughts too.

"Rust as both language and community is so preoccupied with avoiding problems at all cost that it completely loses sight of what matters… focusing on the game being a good game, not on the code being good code."

At the very end of last year I wrote about being more deliberate in my use of languages & at the time was pretty sure Kotlin would work for me as a desktop language after another several month deep dive. I was wrong. The baggage of the Java ecosystem, the small world it occupies that revolves so tightly around planet Google (yuck), and Kotlin's complete inability to play a God Damned sound file on the desktop. Has nobody else noticed that? It probably works fine to throw together Android apps. It probably also works OK on the server. On the desktop it's terrible. Kotlin's also been a dead end for me.

So I'm still using Swift for my desktop work, for now at least, as I have for almost all the last ten years. As we used to say as economics undergrads long ago: it's the least worst option. I'm not a fan anymore, more of a person bruised by all the current alternatives. With perhaps some fan-ish tendencies at times. I can see Kotlin & Rust being useful for things I'm just not that interested in, but if they fit your use case, more power to you. They're not bad languages, just bad for what I want to do. Whereas Swift is… OK. Most of the time.