It’s hard for me to believe, but it has already been a year since I made the switch to iOS (from Android) and Swift. So far I’ve formed the following opinions:

Like:

  • Higher-order functions and closures are amazing to have built-in to the language. My favorites are map flatMap zip reduce filter enumerated dropFirst and dropLast.
  • Protocol-oriented programming is a neat way to encourage composition. I wish they’d call them mix-ins though.
  • Optionals fix the billion dollar mistake.
  • Enforced immutability (bonus points for extra struct behavior) helps catch quite a few bugs.
  • guard and exhaustive switch statements are incredibly useful control flows.
  • Enums with associated values are a great way to pass data around.
  • ARC is nice and predictable.

Dislike:

  • Protocols are still a bit rough in some areas. Hoping Swift4 fixes most of these with the where clause changes.
  • Can’t specify thrown errors.
  • No abstract classes. I still think there’s room for them alongside protocols.
  • Various parts of the API are clunky, like array slices and ranges.
  • Swift code structure is slightly harder to follow, mostly due to extensions.

Most of my complaints are with the iOS APIs and Xcode. All things considered, I’d say I’m happier as an iOS developer. :)