Re:Apple’s use of Swift in iOS 12
by ppeetteerr on Friday September 28, 2018 @10:51AM
(#18093828)
There are three advantages that I saw immediately upon switching to Swift:
- It was easier to hire developers
- Code was less prone to null pointer exceptions
- There were fewer assumptions when deserializing JSON into a struct/object
We moved a very large iOS app over to Swift, and the first two benefits are really huge. I know people have opinions on these things, and both sides are right, but the really strong typing and enforced nullability have been hugely important to getting junior engineers contributing to the codebase.
Not saying that it's an unsolvable problem elsewhere, it's just an anecdotal benefit we got
Having worked on a large Obj-C codebase that began adopting Swift, there are definitely some headaches involved in Obj-C/Swift interop, and you often aren't getting many benefits of Swift unless your new code has few to no dependencies on / is not depended on by Obj-C code, unless you can refactor it into Swift.
Given how quickly it seems they've been forced to ship, I can understand not wanting to deal with these issues, or not having the time to address them.