3 ms·
Clojure doesn't lend itself to doing that. Perhaps the easiest (albeit simplistic) way to describe the difference between Clojure and Scala -- Scala supports O
by elangoc 13y ago
Clojure doesn't lend itself to doing that. Perhaps the easiest (albeit simplistic) way to describe the difference between Clojure and Scala -- Scala supports OOP and FP, and Clojure supports FP only as part of a holistic (and refreshing) vision of how high-level programming is done.
Even if it were possible to do so in Clojure, you probably wouldn't want to. There are usually ways to do the same things in Clojure that makes your code simpler, and as a result, in much less code.
Part of the Clojure philosophy is to make things simpler, even if it isn't always 'easy' at first relative to the individual talking. Even though using a code translation tool is easy, figuring out how to use functions and macros to abstract away repetitious code blocks and patterns from your code is well worth it in the medium- and long-term.
- coolsunglasses 13y agoClojure has OO faculties too, just not in one big tangled ball of mud like Scala and Java.
- elangoc 13y agoyou're right, and Clojure extends the power/flexibility of certain constructs in OOP world, like making dynamic dispatch based on arbitrary types (not just the name of a concrete subclass of a polymorphic superclass)