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:
- Higher-order functions and closures are amazing to have built-in to the language. My favorites are
- 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.
switchstatements are incredibly useful control flows.
- Enums with associated values are a great way to pass data around.
- ARC is nice and predictable.
- Protocols are still a bit rough in some areas. Hoping Swift4 fixes most of these with the
- 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. :)