Live data from Hacker News

The Subjective Charms of Objective-C

wired.com

11–20 of 56 posts

Re: The Subjective Charms of Objective-C

#11
It's a shame that Objective-C never really caught on outside of the NeXT/Apple ecosystem. User interfaces benefit greatly from dynamism, and all the UI toolkits I've used for C and C++ try to emulate message passing in one way or another: from WinAPI's SendMessage, to GTK and Qt's signals and slots.

I'm surprised the wider FOSS community didn't adopt the language. I've been building a GTK4 app recently, and the macro-heavy class boilerplate, C-style casting everywhere, and custom signaling mechanisms would all be far cleaner in Objective-C. It's easy to imagine glib and GTK as what could have been a FOSS parallel to Core Foundation and Cocoa.

If you like C, then Objective-C is definitely worth a look. You don't need a Mac to try it either [1].

[1] https://github.com/gnustep/libobjc2

Re: The Subjective Charms of Objective-C

#12
post #11

It's a shame that Objective-C never really caught on outside of the NeXT/Apple ecosystem. User interfaces benefit greatly from dynamism, and all the UI toolkits I've used for C and C++ try to emulate message passing in one way or another: from WinAPI's SendMessage, to GTK and Qt's signals and slots. I'm surprised the wider FOSS community didn't adopt the language. I've been building a GTK4 app recently, and the macro…

I know that there is (was?) a project to bring an Objective-C equivalent to the web called Cappuccino[0] as well.

It does look interesting though it lacks most modern DX, which means its adoption is going to be limited I imagine

[0]: https://www.cappuccino.dev/learn/

Re: The Subjective Charms of Objective-C

#13
post #11

It's a shame that Objective-C never really caught on outside of the NeXT/Apple ecosystem. User interfaces benefit greatly from dynamism, and all the UI toolkits I've used for C and C++ try to emulate message passing in one way or another: from WinAPI's SendMessage, to GTK and Qt's signals and slots. I'm surprised the wider FOSS community didn't adopt the language. I've been building a GTK4 app recently, and the macro…

Indeed, the late-binding capabilities of ObjC make the data binding scheme used in Apple's Cocoa API so much easier. This is one of the things I miss the most when building GUI apps for other platforms. And you can still mix it with C++ (=> Objective-C++).

Re: The Subjective Charms of Objective-C

#14
post #11

It's a shame that Objective-C never really caught on outside of the NeXT/Apple ecosystem. User interfaces benefit greatly from dynamism, and all the UI toolkits I've used for C and C++ try to emulate message passing in one way or another: from WinAPI's SendMessage, to GTK and Qt's signals and slots. I'm surprised the wider FOSS community didn't adopt the language. I've been building a GTK4 app recently, and the macro…

It is a great language to build on but I think that it was really competing against c++ and unlike QT never had the corporate backing outside of Apple like many open source frameworks have.

Re: The Subjective Charms of Objective-C

#15
Having worked professionally with both C++ and Objective-C[0], I greatly prefer the latter. I'm not in love with either of them, but Objective-C feels so clean and well-thought out compared to the insanity of C++.

That's ok, C++23 is going to add another group of features that will be half-adopted at best in legacy codebases that will totally fix everything this time for real.

[0] in the same codebase via the unholy chimera that is Objective-C++

Re: The Subjective Charms of Objective-C

#16
post #11

It's a shame that Objective-C never really caught on outside of the NeXT/Apple ecosystem. User interfaces benefit greatly from dynamism, and all the UI toolkits I've used for C and C++ try to emulate message passing in one way or another: from WinAPI's SendMessage, to GTK and Qt's signals and slots. I'm surprised the wider FOSS community didn't adopt the language. I've been building a GTK4 app recently, and the macro…

Definitely! I developed several mobile apps in the early iPhone days. I had plenty of C and C++ commercial experience before that. I found Objective C much more pleasant to work with than C++.

Re: The Subjective Charms of Objective-C

#17
Objective C was a far more elegant and powerful solution to the problem of extending C to be "object oriented" than C++.

The square brackets made very clear when you were engaging with SmallTalk style message passing semantics. But the language was still a full superset of C, allowing calling any legacy code you wanted. Or using C syntax for performance critical parts.

And for as much criticism as the language received, it was still the perfect fit for the original iPhone. Performance critical parts in C for the constrained hardware resources. But still allowed for rapid iteration on dynamic UIs for applications.

Re: The Subjective Charms of Objective-C

#18
post #11

It's a shame that Objective-C never really caught on outside of the NeXT/Apple ecosystem. User interfaces benefit greatly from dynamism, and all the UI toolkits I've used for C and C++ try to emulate message passing in one way or another: from WinAPI's SendMessage, to GTK and Qt's signals and slots. I'm surprised the wider FOSS community didn't adopt the language. I've been building a GTK4 app recently, and the macro…

I know that there is (was?) a project to bring an Objective-C equivalent to the web called Cappuccino[0] as well. It does look interesting though it lacks most modern DX, which means its adoption is going to be limited I imagine [0]: https://www.cappuccino.dev/learn/

Yeah. The language is called Objective-J while Cappuccino is the framework. Objective-C : Cocoa = Objective-J : Cappuccino.

I remember that the company behind it was called "280 South". They seem to have opensourced it before they shut down.

Re: The Subjective Charms of Objective-C

#19
One of the coolest parts of Obj-C is that it's the only "dynamic" language that includes header files (AFAIK). This means you can use agentic coding tools way more effectively. Instead of having to shove the whole implementation into context, it can just work off the interfaces. Result is that even with just a few hundred K of context, the agent can reason about an entire large codebase. And because all interop between objects is based on interfaces and protocols, refactoring of implementations becomes trivial.

Re: The Subjective Charms of Objective-C

#20

Earlier quoted context omitted.

I know that there is (was?) a project to bring an Objective-C equivalent to the web called Cappuccino[0] as well. It does look interesting though it lacks most modern DX, which means its adoption is going to be limited I imagine [0]: https://www.cappuccino.dev/learn/

Yeah. The language is called Objective-J while Cappuccino is the framework. Objective-C : Cocoa = Objective-J : Cappuccino. I remember that the company behind it was called "280 South". They seem to have opensourced it before they shut down.

Obviously I misremembered. I just visited the site linked above. The company was "280 North"
Post reply on HN