4 ms·
"The way a programming language is used is the way it encourages its usage." The way libraries are written is therefore the only representative metric for your
by j-pb 7y ago
"The way a programming language is used is the way it encourages its usage."
The way libraries are written is therefore the only representative metric for your definition of "language".
You still haven't made a point how C++ is relevant, given that Rust is arguably a safe systems programming language.
Since you really dislike the 5-10% impure parts of clojure, you must really hate the 100% impure common lisp.
So whats your point really?
That clojure is still too close to common lisp, and we should all use a haskell or idris with s-expressions?
- pjmlp 7y agoYou completely missed my point. I fully embrace 100% of Clojure language features, and am pointing out that Clojure by specification fully supports OOP, regardless of some people talk about it not being an OOP language. C++ is being used as a methapor, because telling that it is not like people use Clojure, would be like me telling that C++ is safe just because some people don't use the low level unsafe features even though they are part of the language standard as much as Clojure OOP ones are. If anything I just get tired of many not understanding how Lisps embrace OOP, after all very few languages offer OOP capabilities as powerful as CLOS. They should all read "The Art of the Metaobject Protocol" book, plenty of copies still available.
- j-pb 7y agoBut 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.