Live data from Hacker News

Ask HN: How many of you Apple developers still use Objective C?

news.ycombinator.com

11–20 of 160 posts

Re: Ask HN: How many of you Apple developers still use Objective C?

#14
Modern Objective-C with ARC is fairly painless, especially compared to the Objective-C of yore. And if you are doing macOS-specific work for a C/C++ codebase, it's still simpler to integrate than Swift is.

Method swizzling is also an important tool for any aspiring macOS developer, unavailable/onerously painful in Swift.

All in all, I don't think there's anything wrong with continuing to write new things in modern Obj-C as long as you're conscious of the tradeoffs and interoperability is a concern.

Re: Ask HN: How many of you Apple developers still use Objective C?

#15

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.

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.

Re: Ask HN: How many of you Apple developers still use Objective C?

#16
I do my hobby projects in Objective C (and C++). It still does everything I need it to. Have not had a job programming iOS or macOS projects for a long time, so not sure what I'd use there. Maybe the industry has moved on from me. My impression of Swift is that it's fine but doesn't offer much that is worth the effort of learning and mastering it to the point of proficiency. If Apple suddenly deprecated/removed it, I'd probably just stop programming for their ecosystem.

Re: Ask HN: How many of you Apple developers still use Objective C?

#17
I use Objective-C exclusively (no Swift) in my App Store apps.

I wrote a Swift app for a hobby/free project a few years ago and regretted it. They changed the language and deprecated some of my code, which isn't easily replaceable without a significant rewrite. The project now compiles only in Swift 4 and will die when Swift 4 support is removed from Xcode.

I see no reason to use Swift. The compiler is slower and buggier. The debugger is slower and buggier. C interoperablity, while it exists in Swift, can be very painful. And I don't actually ship any bugs that Swift could have theoretically saved me from. I see no gain in switching.

People have been telling me since 2014 that every line of code I write in Objective-C is "technical debt". I continue to laugh at them and ask them to compile Swift code they wrote in 2014.

Of course if I had to get a job, it would be a different story, but I own my company, so I can do whatever I want.

Re: Ask HN: How many of you Apple developers still use Objective C?

#18

Still have some in work projects, as they're old, but gradually moving on to Swift whatever we can. Though in the FAANG world - Objective C reigns supreme

Not only objective-c but lots of c++ (useful for cross platform libraries that run on targets besides ios/macos) and that road leads to objective-c++. But at least at Meta many iOS projects use swift now too.
Post reply on HN