top | item 39442564

(no title)

ironlake | 2 years ago

I am an iOS developer and I haven't used ObjC in over five years. There probably isn't any reason to start a new app or library with anything other than Swift. So it's just going to depend on the legacy code base.

discuss

order

Reason077|2 years ago

I agree there's no good reason to write new (iOS) stuff in ObjC now days, but you're likely to still encounter plenty of ObjC if you're maintaining old projects.

Interoperability between Swift and ObjC works really well for the most part, so I tend to write any new files/modules in Swift, and older apps end up being a hybrid of both. I rarely see justification in rewriting existing ObjC code in Swift unless the code needs a rewrite anyway.

troupo|2 years ago

> There probably isn't any reason to start a new app or library with anything other than Swift.

Unless you do anything for MacOS and care about MacOS. Most Swift UI apps I've seen feel foreign on MacOS in innumerable ways.

sumuyuda|2 years ago

You can use AppKit in Swift just like you can use UIKit on iOS. There is no requirement to use SwiftUI when creating a macOS swift app.

ironlake|2 years ago

Thanks for that perspective. I haven't done any MacOS development.