Comment by tl
4 years ago
While there are parts of Swift that I like, I am more and more convinced as time goes on that Swift in general, and specific sub areas of Swift (like SwiftUI or Swift Charts) are destined to follow the trajectory of .NET as decried by Spolsky in How Microsoft Lost The API War [1]. To the extent this is true, it is likely smarter long term to avoid Swift except in cases where Apple has enforced its usage (like the watch).
For problem areas where Apple's frameworks provide a useful or necessary solution, accessing them from Objective-C instead of Swift is more stable. Examples like Accelerate, HealthKit, and StoreKit come to mind.
For problem areas where Apple has no advantage but you want to ship code there, oft derided but broadly usable solutions like C++ (which connects to Objective-C better than it does to Swift) or Javascript dominate.
Even Apple appears to struggle at drinking its own koolaid, given the recent criticism of the Settings port to SwiftUI. [2]
[1]: https://www.joelonsoftware.com/2004/06/13/how-microsoft-lost...
[2]: https://daringfireball.net/linked/2022/08/15/ventura-system-...
The more I use Swift, the more I miss Objective-C. I tend to like opinionated languages that take firm stances - all method calls are messages, everything really is an object, fail early, etc.
Swift seems to be more and more a kitchen sink language. Compile time linking, v-tables, and dynamic dispatch? Sure! There’s so much syntactic sugar masking seemingly unchangeable implementation details (throws/try/catch) and odd implementation choices (protocols associated types vs structs and classes generics). Builder methods are just plain weird, imho.
I had a lot of hope for Swift early on, but it seems like a rudderless ship.