News for hackers. Stuff that matters.
Re:An Object-Oriented Language for the '20s by SomeHacker44 on Saturday March 13, 2021 @09:39AM (#26446827)
Which begs the question: why use OO at all if you prefer composition? I personally am "over" OO, even though I have been doing OO professionally for decades.
Re:An Object-Oriented Language for the '20s by blowski on Saturday March 13, 2021 @09:59AM (#26446970)
Over the last 30 years, object oriented languages got more attention, more funding, more companies using them, more jobs available, more developers, more education resources, more libraries.

In short, I use OO because everyone else does. Now in my 40s, I’m not going to change merely because another language is more expressive.

But yeah, if I could do it all over again, I’d probably choose Clojure.

Re:An Object-Oriented Language for the '20s by mikewarot on Saturday March 13, 2021 @10:34AM (#26447222)
>why use OO at all if you prefer composition?

OO is a way to bundle a structure with the methods to manage it.

Inheritance is a way to manage the need to customize an object.

Composition is a way to bundle objects.

Why wouldn't you do both? That's what Delphi did back in the 1990s when they built the Visual Component Library. (VCL)

You build your forms in the GUI builder, which composed a form object out of various components which were all eventually derived from tObject. It still lives on, and Lazarus implements something similar for Free Pascal.

Re:An Object-Oriented Language for the '20s by invisiblerobot on Saturday March 13, 2021 @09:48AM (#26446901)
Exactly. Polymorphism is the killer feature and it's expressed more simply in functional languages like Clojure.