Live data from Hacker News

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

news.ycombinator.com

71–80 of 160 posts

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

#71
post #35

I've given up on Apple platform development, but I strongly prefer Objective-C over Swift for a variety of reasons, including elegance, compatibility, stability, etc. It's important to note that there's still tons of Objective-C written inside Apple to this day, perhaps more than Swift. What Apple pushes as what you should be using is often not what they are using internally, FWIW. Third-party developers are its true…

> It's important to note that there's still tons of Objective-C written inside Apple to this day, perhaps more than Swift.

I don’t know if this is true or not, but Apple certainly isn’t writing its own end-user applications with good macOS technologies and support (which means it’s not using Objective C and Cocoa). Apps like Reminders, Notes, Photos and others on macOS seem and behave like poorly ported versions of an iOS app.

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

#73
We still default to Objective-C in our SDK. We still support iOS 11, and I don't think we've been bothered enough by Objective-C to check which versions of Swift can be used on the versions of iOS that we support (I last checked a couple of years ago when we supported iOS 8, where the compatibility matrix was a problem for us). However, the examples are in Swift, and we're using Swift wherever the language doesn't matter. iOS's Objective-C support and Objective-C/Swift interoperability is good enough that there aren't business pressures to switch, and the code isn't changing frequently enough that refactoring to Swift would save us in overall time/effort.

That being said, we are going to refactor from Google's Closure Compiler to TypeScript on the JS side of the project: surprisingly, we've seen more discomfort with developing with Closure Compiler than we've had complaints with developing with Objective-C.

Objective-C is a really neat, old language. Initially I was very gungho about switching to Swift, but all of my pain points are with the Apple APIs that we're accessing (and not Objective-C itself). If Objective-C had dot-syntax for calling methods, some more modern typing, and the less verbose Apple APIs, I would have been very happy sticking to Objective-C.

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

#75

As objective-c is a true superset of C, it is a much more effective and ergonomic system language -- interfacing with mach, Posix and Carbon APIs -- than Swift in my experienced opinion.

I agree. I wish the Free Software crowd had adopted it - they sorta did with GNUstep - but unfortunately it doesn't receive the attention it deserves. Anecdotally I've noticed many C and C++ GUI frameworks, like Gtk and Qt, reinvent the dynamism of Objective-C in some way or another (signals/slots, property bindings, etc). The whole GObject system could have been a GNUstep alternative.

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

#76
post #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 bug…

As a counter-anecdote from someone who also runs their own company, I began dabbling in Swift in 2014. I held off on full Swift adoption until after the big API renaming that happened with Swift 3, so language migrations haven’t been a big deal. The compiler is slower, but I can still do a clean build in 43 seconds. Maybe I’ve had a good experience because I’m not working on a FAANG project with a million lines of co…

> If you find yourself enjoying ObjC, by all means keep using it. Or C.

I didn't say I enjoyed ObjC. That's not really how I choose my tools. It's a job. The choice is utilitarian.

> Or Pascal.

I seem to recall enjoying Pascal somewhat, though that was a very long time ago.

> Or Lisp.

I definitely recall not enjoying Lisp. Not at all. Yuck.

> that doesn’t account for extra-hours and bugs it takes to get there.

If Swift helps you, that's great. I'm just writing about my experience. For me, it doesn't help. I'm certainly not deliberately avoiding a tool that would help me. I do write my share of bugs, but I rarely write the type of bugs that the Swift compiler would catch, and I never ship them. YMMV

I'm not intending to offer advice of any kind to others. I'm not much for giving or taking advice. And like I suggested, if I needed to find a job, then I'd probably have to go all-in on Swift. My goal, though, is to never get another job for the rest of my life. ;-)

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

#78
post #76

Earlier quoted context omitted.

As a counter-anecdote from someone who also runs their own company, I began dabbling in Swift in 2014. I held off on full Swift adoption until after the big API renaming that happened with Swift 3, so language migrations haven’t been a big deal. The compiler is slower, but I can still do a clean build in 43 seconds. Maybe I’ve had a good experience because I’m not working on a FAANG project with a million lines of co…

> If you find yourself enjoying ObjC, by all means keep using it. Or C. I didn't say I enjoyed ObjC. That's not really how I choose my tools. It's a job. The choice is utilitarian. > Or Pascal. I seem to recall enjoying Pascal somewhat, though that was a very long time ago. > Or Lisp. I definitely recall not enjoying Lisp. Not at all. Yuck. > that doesn’t account for extra-hours and bugs it takes to get there. If Swi…

> I didn't say I enjoyed ObjC. That's not really how I choose my tools. It's a job. The choice is utilitarian.

Given C is faster and more mature than ObjC, why aren’t you writing everything in pure C and objc_msgSend?

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

#79

I don't, but know many that do. I'll bet almost all AAA apps are still ObjC, and I know that Apple still uses it, in-house, for a lot of their stuff. I write my Apple stuff exclusively in Swift, and don't bridge to C. I have been doing that, since 2014. Before that, I wrote in ObjC. I still use UIKit/AppKit/WatchKit for my shipping apps, though. I do not believe that SwiftUI is ready yet, for the scope of my work (I…

SwiftUI definitely needs more time in the oven, but I’ve found it ok for bite-sized bits of UI where with UIKit boilerplate is as large or larger than the UI code and for screens that aren’t doing anything too interesting (e.g. a typical Settings.app style settings screen). For now though, the bulk of my UIs will continue to be built with code-only (no storyboards/XIBs) UIKit.

It makes writing trivial apps incredibly easy. It's just when I need to stray off the beaten path (most of my projects), that I run into issues.

I tend to use storyboards, because of some of the fancy auto-layout stuff I do.

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

#80
post #35

I've given up on Apple platform development, but I strongly prefer Objective-C over Swift for a variety of reasons, including elegance, compatibility, stability, etc. It's important to note that there's still tons of Objective-C written inside Apple to this day, perhaps more than Swift. What Apple pushes as what you should be using is often not what they are using internally, FWIW. Third-party developers are its true…

Elegance. I keep hearing that from obj-c devs and I really don’t understand what is so elegant about it. Maybe it’s more to do with familiarity? I find swift much easier to deal with and more “elegant” to read.

Message passing is nice. Swift just has function calls like any other OOP language.
Post reply on HN