6 ms·
Yeah but it's neither encouraged nor fundamental. Whereas most common lisp code heavily emphasized loops and methods in an impure way. CL is a systems programmi
by j-pb 7y ago
Yeah but it's neither encouraged nor fundamental. Whereas most common lisp code heavily emphasized loops and methods in an impure way.
CL is a systems programming language, while clojure always feels like a tool for tought, in the APL sense.
- pjmlp 7y agoWith that line of thought, C++ is a safe systems programming language. The features are there and everyone is free to use them, and I am yet to see a Clojure linter against using those features. In fact, Clojure cannot interop with its host platforms without doing any kind of OOP.
- j-pb 7y agoYou'd be surprised how well a common philosophy in the community keeps everything nice and tidy. If you look at old clojure libraries like Incanter which were still heavily influenced by CL they're nothing like recently developed ones. The preferred way of doing things is like this: Data > Functions > Interop > Macros. Clojure discourages mutability and side effects. CL embraces them, it doesn't even have immutable datatypes, let alone sane deep equality. I don't see how C++ is relevant since even Rust has unsafe.
- pjmlp 7y agoIt is relevant, because the unsafe features are still there, regardless how many use them, language culture and what not. Likewise Clojure contains the main features of CLOS and makes use of them to interop with JavaScript, Java and C#, regardless how many in the community make use of it. A language is made by the language specification and its standard library, not by whatever the community feels as trendy. Present us a full compliant Clojure implementation minus CLOS, and lets see how far it goes.
- 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 ago