Live data from Hacker News

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

news.ycombinator.com

151–160 of 160 posts

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

#151
post #149

Earlier quoted context omitted.

It's condescension because you continue to refuse to believe what I'm saying, and you keep insisting that something difficult is easy. Moreover, if I needed help with a Swift issue, I would go to my many friends and associates in the Apple developer community. In fact, I've discussed the issue with some members of the Apple Swift engineering team, and I have an open bug report that Apple hasn't addressed. The very la…

I don't doubt that you find it difficult, I am just saying that I never had any problems migrating to Swift 5. That's why I offered help, and because I am genuinely curious what it was that you found so overwhelming.

> I don't doubt that you find it difficult

Wow, you just won't stop with the condescension. You won't even accept that it is difficult.

> I am just saying that I never had any problems migrating to Swift 5.

Good for you. Guess what, people have different code and different experiences.

> you found so overwhelming

I didn't say it was "overwhelming". I said that it's more trouble than it's worth for a free hobby project. It's not even a real problem yet, because as I already said, "The project now compiles". The problem will occur "when Swift 4 support is removed from Xcode", which hasn't happened yet. Even when that does happen, I can keep around an older copy of Xcode for quite some time.

The reason I brought this up in the first place is that unlike with Swift, I can still compile very old Objective-C code, and sometimes I need to. Objective-C generally doesn't break stuff (with the notable exception of Objective-C Garbage Collection). I'd rather not deal with the hassle of tool breakage if I don't need to.

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

#152
post #151

Earlier quoted context omitted.

I don't doubt that you find it difficult, I am just saying that I never had any problems migrating to Swift 5. That's why I offered help, and because I am genuinely curious what it was that you found so overwhelming.

> I don't doubt that you find it difficult Wow, you just won't stop with the condescension. You won't even accept that it is difficult. > I am just saying that I never had any problems migrating to Swift 5. Good for you. Guess what, people have different code and different experiences. > you found so overwhelming I didn't say it was "overwhelming". I said that it's more trouble than it's worth for a free hobby projec…

That's because Objective C is too old for anyone to bother improving it. That doesn't seem like a positive.

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

#153
I don't develop for Apple anymore, but tried swift ecosystem once, wasn't impressed. ObjC does its job, and I'm from the camp named "if it does the job and has no obvious limitations, there's no reason to switch". It's a mature language that works, and I know both C and ObjC, and the whole system is native to these two. What else would I need? I think I could answer this question, but the answer isn't Swift. If I'll have to do Apple again, I'll start with ObjC, unless it becomes completely abandoned at the time.

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

#154
post #61

I work on an app that's over a decade old, and there's a fair mix of Objective C and Swift. While we tend to add less new Obj C, we don't go out of our way to replace old Obj C with new Swift if the old code is working. If it makes sense to replace some of the Obj C, we do, and this happens on a case by case basis. At the end of the day code is just a tool, and if it's doing its job it's worth a sober look at whether…

clear separation of declaration and implementation files

Yeah, that's the thing you always squint at, but start missing when it's gone. Working with modern languages without declarations quickly makes you feel like the declarations are missing.

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

#155
post #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.

They sort of reinvented ObjC in Vala, with the main problem being it's barely known.

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

#156
post #87

Earlier quoted context omitted.

> C interoperablity, while it exists in Swift, can be very painful Interesting, that hasn't been my experience. I'm curious, what have you ran into that was painful?

If I recall correctly you have to make a separate module with the bridging headers, but the first problem is that I can't remember exactly of the syntax of that file. The second is that it's a lot of code and files to make when we only have one import to hack something quickly. For a full library it's probably a very cool feature though. The third one is more related to my use case. I made a binding with a non-C code…

Alright yeah, I can concur with the packaging of the library so that it would eventually link and be accepted by the App Store which is surprisingly not the same set of requirements. It's just that I didn't completely chalked this up to Swift interop with C specifically but more the fact that multiple things Apple side need some jumping-through-hoops and that's just one of them.

I solved that through importing the dependency with Conan, and having extra steps running afterwards that would perform some quick and dirty lipo, xcodebuild and PlistBuddy stuff. It just wasn't that complicated, and only a few headscratches, but then it'd work and there was no need to touch that again, but situations may vary and I get that it could be painful in some cases.

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

#158
post #137
post #134

Earlier quoted context omitted.

Interestingly the dot syntax was proposed and I believe even implemented after Apple acquired NeXT, but it never shipped.

Objective-C has dot syntax. It shipped.

For properties, not for methods.

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

#159
There is a very common thread here- the objc users are happy where they're at, the Swift fans don't understand and want to tell them why their opinion is wrong.

My god, sit down and just nod and say to totals "oh you like ObjC, neat ", or better yet try to understand what they're saying. You do not have to offer your trite condescension.

ObjC is a fantastic language, Swift is fine too but the compiler is slow and breaking changes to the language are painful.

The migration assistant? FFS it only goes so far, and only when it works.

Post reply on HN