3 ms·
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.
by SomeHacker44 6y ago
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.
- invisiblerobot 6y agoExactly. Polymorphism is the killer feature and it's expressed more simply in functional languages like Clojure.
- blowski 6y agoOver 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.
- mikewarot 6y ago>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.