Why Not Objective-C
I led the effort to port our remaining Objective-C to Swift. When I started that project, Objective-C was about 25% of the code; when I retired it was in the low single digits (and has gone even lower since, I’ve heard).
[…]
Objective-C code was where a lot of our crashing bugs and future crashing bugs (and bugs of all kinds) lived.
[…]
A second thing we knew was that having to interoperate between Swift and Objective-C is a huge pain.
[…]
And a third thing we knew was that very few of our engineers had a background writing Objective-C. Maintaining that code — fixing bugs, adding features — was more expensive than it was for Swift code.
I prefer Swift for new code, but I don’t really want to rewrite working code. I haven’t found my old Objective-C to be a source of bugs. However, I always seem to end up rewriting more than I initially planned because the interop is such a pain. I like using Swift for the main data types in my app, but of course those get used everywhere, including from Objective-C code. I’m also convinced that Objective-C interop is a source of some of the weird compiler behavior I see with crashes and dependency tracking. The part I don’t like rewriting in Swift is stuff that calls plain C APIs. The Swift version often feels less readable, and I’m less sure that it’s correct—both the opposite of my normal experience with the language.