4 ms·
think of it as clojure to java, even without embodying the whole lisp ethos, it gives you a lispy base to write python code, plus extra niceties (threading -> I
by agumonkey 4y ago
think of it as clojure to java, even without embodying the whole lisp ethos, it gives you a lispy base to write python code, plus extra niceties (threading -> IIRC)
plus you get to benefit from paredit under emacs
- skissane 4y agoClojure is more than just a Lisp for the JVM – it is a Lisp for the JVM with a big focus on immutable data structures – whereas traditionally most Lisps put mutability first instead. There are other Java-based Lisps, such as Armed Bear Common Lisp (ABCL), which are more traditionally Lisp-like in this regard. I think Hy is more of a traditional Lisp, since it shares Python's native focus on mutable data rather than trying to foreground immutability.
- eduction 4y agoLet’s not be too pedantic, it was just an analogy, not a bad one, nor perfect but none are. As a Clojurist I think it behooves us not to put on gatekeeping airs (because we’re up against those too).
- skissane 4y agoI wasn't trying to gatekeep anyone (and I make no claim to be a "Clojurist"–my Clojure experience is rather minimal). I was making a point about categorisation, taxonomy. There is a certain category of Lisp-like languages – of which Hy, Fennel and LFE are good examples – which take an existing language, and provide a Lisp-like syntax for it, but generally keep the semantics reasonably close to that of the underlying language. Beyond the syntax, the other main addition tends to be a Lisp-style macro system. Maybe we might call them "veneer Lisps", since they put a Lisp veneer on another language, but beneath the surface it is largely the same. Clojure isn't a veneer Lisp, because its semantics are quite different from Java – Java is primarily about mutable data, and Clojure-style immutable data structures aren't the mainstream Java approach. A JVM Lisp which dropped Clojure's emphasis on immutability could be a veneer Lisp. Armed Bear Common Lisp and Kawa Scheme are examples of mutability-oriented JVM Lisps, but they don't belong to the category of veneer Lisps either, since they are ports of pre-existing languages to the JVM, and their mutability comes from those pre-existing languages not a desire to conform to Java/JVM semantics. I'm not saying there is anything wrong with immutability, or that Clojure's focus on it is a mistake, or that one ought to either prefer (or avoid) "veneer Lisps": I'm attempting descriptive taxonomy, not prescriptivism.
- giantdude 4y agoThat! Clojure is an elegant experiment with immutability. The implementation details of Clojure's datastructures are a pure joy to look at. JVM is an unfortunate choice as I see it, but it's a pretty solid system which is benefiting from decades of research on JIT, GC, etc, so not entirely unreasonable as a back-end. I have few good things to say about Python, other than it sort of works. I classify it in the big-sack-of-stuff languages, along with Perl and shells. Not much elegance or style.
- gleenn 4y agoClojure is definitely more than an experiment. It processes many millions of dollars daily through things like banks and even at Walmart. It might not be used a lot, but experiment is not accurate at all. You didn't flesh out your comment about Java, they used to also transpile to C# and still to Javascript. I think Java's fast memory allocator is particularly suitable to the immutable data structure memory requirements. I also find the JVM a very robust and mature platform. It's also a great gateway being able to interop into corporate environments as a way to get traction. I am curious what other language you think would be better given those desired traits that Hickey designed for.
- inawarminister 4y agoThere's also CLOJERL - Clojure on BEAM (Erlang), and recently CljDart, clojure to dart transpiler was released and seem to have a lot of momentum.
- agumonkey 4y agoi know it's not a full fledged thing like clojure, but it never had that scale in mind either. I should have added a modal in my comment above :)