4 ms·
But like I said, according to that reasoning Rust isn't safe either. Which it clearly is. But sure you could program clojure in an extremely OO way, with multim
by j-pb 7y ago
But like I said, according to that reasoning Rust isn't safe either. Which it clearly is.
But sure you could program clojure in an extremely OO way, with multimethods and protocols.
In my experience you never use the former, and you pick the latter only for performance reasons or in the extremely rare case where you need your own custom datatype.
Haskell has typeclasses, and ML has Modules, which allow for polymorphic single dispatch.
But I don't think one would argue that they're OO.
In the comment you replied to, I said that CL focuses on imperative code, which it does because of side effects, and OO, which it does, because evidently CLers love CLOS.
The clojure community avoids both of these things.
- pjmlp 7y agoRust is way safer than C and C++, but that doesn't avoid a couple of CVEs in unsafe code already, and several crates make use of unsafe also when safe alternatives do exist. There isn't any 100% safe language, even formal proofs can have logic errors. The Clojure community cannot avoid what is a required feature to integrate with the host platforms.
- j-pb 7y agoAgain, with that reasoning every programming language is procedural, because they all run on procedural operating sytems. Clojure uses JS and JVM as targets to gain reach and to reuse existing code, having good interop with them makes it a hosted language but not one that is bound to the programming model of the language it's hosted on. Avoidance means rare usage, and no usage if possible, not circumvention.