Spending a few weeks using Swift last month was surprisingly refreshing after a long while of mostly working in Python. Some thoughts that come to mind, not at all comprehensive:

  • Relatively sane typing: I could parse a JSON string and know what I ended up with on my first attempt, inference allows for cleaner code without sacrificing type safety much at all (e.g. static properties/enums can be passed without type), any other things that saved me a lot of debugging time

  • Feels built for more modern use cases: extending a struct with protocols such as Codable for parsing/stringifying or Identifiable for unique IDs, fairly friendly async UI, etc.

  • Some slightly opinionated but sensible design decisions: named function parameters that can easily be made optional, clean one liner syntax for null coalescing or try-catching, SwiftUI feeling rather integrated with the language (decorators for state, no separate templating language), etc.

The biggest drawbacks are probably the broader ecosystem:

  • Limited editor support outside of Xcode
  • Not much support for non-Apple environments—I would ideally want something closer to Swift+SwiftUI for frontend web dev but JS/TS of course has a myriad of declarative frameworks to choose from so I’ll live.
  • Some performance and optimization issues although these didn’t affect my use case too much

All in all, I’m definitely glad I spent a bit of time learning it as it reminded me how much fun development could be… despite much of that time being spent working through UI bugs as someone not as experienced in frontend work. I moved on to TypeScript for now which seems to address some of the pain points and feels more widely applicable, but I do miss some of the opinionated developer experience that Swift offers and I’m keen to see where the language will go in the future.