Hacker News new | ask | show | jobs
by brantonb 900 days ago
At my last job, we slowly started adopting Swift in 2016 by writing some unit tests with it. Once we felt comfortable and established some coding conventions, we started adding some production code. By the time I left in fall 2023, we were well over 50% Swift without any big rewrites of Obj-C code. Almost all the new code came in as Swift because developers enjoyed writing it over Obj-C.

Sounds like you rely on Categories a lot. Check out Extensions in Swift. [1]

There are some limitations (e.g., Swift enums lose a lot of their power if they're needed in Obj-C) but overall the interop is great. I don't remember anything in UIKit that couldn't be done with Swift. And if you're dealing with unicode text, doing things in Swift may make your life much easier.

[1] https://docs.swift.org/swift-book/documentation/the-swift-pr...