News for hackers. Stuff that matters.
Re:Bringing Objective-C to the Amiga (2018) by jfb on Thursday October 07, 2021 @07:58PM (#28793741)
I have a deep fondness for Objective-C, which always struck me as a much more elegant way to bridge the C/OOP divide than C++.
Re:Bringing Objective-C to the Amiga (2018) by mhd on Friday October 08, 2021 @03:27AM (#28796613)
Sure it was more elegant, it took its inspiration from SmallTalk after all ;)

Of course that lead to a bit of a mixed result. For one, most of the new features were syntactically isolated to the Obj-C square brackets. On the other hand, within those brackets things were considerably un-C-like. object.method(arg) seems more "native" than [object method:arg].

I actually liked this grafted-on appearance. It was a clear signal that said: Yeah, we're still C, let's not make any illusions about this. By comparison C++ had more delusions of grandeur, almost from the start.

This is also why I'm not that fond of almost any changes to Objective-C that were made later, especially by Apple. That includes the various searches for better memory management, but also the property dot syntax.

I'm still a bit sad that the Objective-Javascript thing never took off. Way better than most of the added language features since then.

Re:Bringing Objective-C to the Amiga (2018) by jfb on Friday October 08, 2021 @11:45AM (#28800524)
One of the best things about OS X (as it used to be called) is that the runtime was accessible not just from Objective-C, but also from ruby or python or JavaScript. It was very cool to be able to fire up a repl and go exploring in the innards of the various frameworks.
Re:Bringing Objective-C to the Amiga (2018) by wues on Friday October 08, 2021 @06:57AM (#28797809)
Yes, the distinction between class and instance methods in an interface with + and - characters must be one of the most elegant solutions introduced in a programming language ever.

Seriously, I could never understand this claim of "elegance" of Objective C…

Re:Bringing Objective-C to the Amiga (2018) by jfb on Friday October 08, 2021 @09:51AM (#28799295)
Really? Whinging about syntax? You don't understand how cleanly dividing the C bits and bobs from the Smalltalk-derived object system by using distinct syntax could be considered a more elegant solution to the problem than C++'s insistence in rooting both worlds in a single hierarchy of functionality?