4 ms·
Clojure was never against any of the ideas in OO, just that they should be accessible individually if or when they make sense. Traditional OO is very “all in”,
by dkersten 6y ago
Clojure was never against any of the ideas in OO, just that they should be accessible individually if or when they make sense. Traditional OO is very “all in”, while Clojure is very a-la-carte use the bits that make sense for the problem you are trying to solve. Clojure also encourages a data-over-objects and a functional-first approach, but when you need the OO features, they’re there and you should use them.
- junke 6y agoJust to clarify, CLOS is very a-la-carte too.
- pjmlp 6y agoEven Smalltalk supports the other way around, although very few are aware of it, because they never bother to learn it. You can do LINQ style coding in Smalltalk-80, and modern Smalltalks like Pharo do support traits as well. So the point being that all major languages embrace both paradigms. "Traditional OOP" basically boils down to Java until version 8 or C# until version 3, and very little else, but unfortunately most teachers fail at giving overviews of programming languages thorough computing history, and many just learn what they can reach out for.
- dkersten 6y agoWell, yes, I should have said “popular OO” instead of traditional. I did mean the Java’s and C#’s, Ruby’s and Python’s of the world, not the Smalltalks. > So the point being that all major languages embrace both paradigms. Sure, nowadays, most languages are very much multi-paradigm, but typically there is a dominant paradigm and the others are somewhat second-class. For example, in recent years, Java has gained a lot of functional programming feature too, but its not in the same ballpark as Haskell.