News for hackers. Stuff that matters.
Re:Ask HN: How many of you Apple developers still use Object... by lapcat on Tuesday February 20, 2024 @01:20PM (#39444737)
> 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 Object... by sandofsky on Tuesday February 20, 2024 @02:07PM (#39445460)
> 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 Object... by lapcat on Tuesday February 20, 2024 @02:30PM (#39445748)
> Given C is faster and more mature than ObjC, why aren’t you writing everything in pure C and objc_msgSend?

TBH your question feels trollish, but I'll respond anyway.

Objective-C code does compile to objc_msgSend calls. Perhaps you meant getting the method implementations directly and calling them instead?

Objective-C is 40 years old. How much more mature does it need to be?

Re:Ask HN: How many of you Apple developers still use Object... by sandofsky on Tuesday February 20, 2024 @02:44PM (#39445936)
You said you make the utilitarian choice. By using C everywhere, you can use an even faster compiler that doesn’t insert those calls for you. So why don’t you?
Re:Ask HN: How many of you Apple developers still use Object... by lapcat on Tuesday February 20, 2024 @02:55PM (#39446075)
> By using C everywhere, you can use an even faster compiler that doesn’t insert those calls for you.

In the previous comment you said I should use objc_msgSend, now you say I shouldn't. Make up your mind. ;-)

Anyway, I'm using AppKit and UIKit to write apps. The API is Objective-C. That's why I write Objective-C.

Whatever the heck you're talking about—you appear to be confused, so I don't know what exactly you mean technically—it certainly sounds like premature optimization, which is a waste of time and not the correct utilitarian choice. My Objective-C code is not "slow". Could it be infinitesimally "faster" in way that's not even perceivable by the user? Perhaps, but who cares?

[dead]
Re:Ask HN: How many of you Apple developers still use Object... by lapcat on Tuesday February 20, 2024 @04:01PM (#39446849)
Ben, don't play coy and pretend you weren't trollling when it's 100% clear now that you're trolling, and everyone can see that. I'm done here.
Re:Ask HN: How many of you Apple developers still use Object... by lawgimenez on Tuesday February 20, 2024 @06:10PM (#39448198)
Just figured that dude you respond to is the one who created Halide camera. Not expecting him of a troll type, until today.
Re:Ask HN: How many of you Apple developers still use Object... by Apocryphon on Wednesday February 21, 2024 @11:53AM (#39456215)
He's very active on social media.
Re:Ask HN: How many of you Apple developers still use Object... by solumunus on Wednesday February 21, 2024 @01:36AM (#39450792)
Because of all the downsides. The utilitarian choice is about practicality, not pure performance. This line of questioning is silly.