83 points · by chewxy · 9y ago · 139 comments
It's not not predominantly a functional programming language and has no rich set of immutable, persistent data structures.
So, it's no Clojure. But it is young. It may become a clojure but it seems presumptuous at this stage..
Clojure is one of the most revolutionary programming languages of the last decade, I can't see how this mini-toy-language packaged as a Go library can be compared to the mighty Clojure with a straight face.
To my mind though, Clojure brought clarity to the JVM on issues of concurrency, state, mutability, object orientation and persistence and for that I will always love it.
Data is a first class citizen of the language: data literal is part of its syntax, and it uses powerful persistent data structures behind that.
Programming with Clojure is what has made me realise that data is really what matters after all. None of that FP or OO discourse should deviate us from that reality check that computing is all about data-in/data-out. Pull the plug and/or battery of your computer and see what remains next time you power it up.
So yes, Clojure may not be revolutionary in itself, it does rely on the shoulders of giants. It is however setting a new standard in terms of being successful in bringing together a very well thought out set of features and philosophy to bring the focus of programming back towards the real complexity, instead of the accidental one created by how we think.
It is not pure, but it is much closer to this than other lisps and it is immutable by default with efficient functional data structures. CL and Schemes are not this way.
Source: I played for a while around 2008 with common lisp and web apps, and while the tooling (hunchentoot, elephant, etc.) was solid, my completely subjective assessment was that the community languished and it was very hard for newbies.
EDIT: Why was I downvoted? Explanations enable enhancement more than punishment... Is it for the reddit-like "source:"? I really dont get it.
The only thing special about Clojure is that it was marketed well and became popular.
Then, yes, others existed before Clojure.
Clojure is just another lisp.
Why do you say that?
> no powerful macro system
It has macros that...look pretty powerful to me? What's your issue with them?
> doesn't share with Lisp the code-as-data philosophy
Can you flesh out your objections a bit more?
Edit: For the sake of anyone reading this later, the comment I was replying to originally said Zygomys wasn't a lisp, which seemed a bit odd. It has since been edited to say Zygomys isn't Clojure, which is quite correct.
zygo> x := 3; y := 5; if x + y == 8 { (println "we add up") } else { (println "wat?" ) }
still something being lisp is not really sufficient to claim it is clojure. clojure is much more.Perhaps a better analogy would be Groovy, rather than Clojure? (Of course, Groovy isn't "cool" these days, so I guess there's not much marketing juice in comparing your new language to it...)
Lisp doesn't either. Functional programming >> immutability.
Not in the sense that it is more like Clojure than another Lisp in syntax and semantics.
if x + y == 8 { (println "we add up") } else { (println "wat?" ) }
really seems to combine syntaxes in a super-confusing manner ... The "if" is not in an s-expression, but the println call is? And there are blocks denoted using C-style braces mixed in ... I think this would take a while to get used to. :) (println
(if (== (+ x y) 8)
"we add up"
"wat"))Clojure is a language which compiles to JVM byte code, which is also the platform that java compiles to, so (as consequence of that) they can interoperate.
But I don't think Clojure was meant as a replacement for Java or some kind of extension of the Java language or some sort of CoffeeScript for Java.
Clojure is a powerful functional programming language with lots of new paradigms and original ideas - quite at the opposite spectrum of the object-oriented Java.
Although I don't program in it, my C++ coding skills and more importantly architectural skills, improved dramatically after learning Clojure.
So the title of the article is incorrect (and click-bait-y).
> x := 3; y := 5; if x + y == 8 { (println "we add up") } else { (println "wat?" ) }
though mixing C like syntax and LISP is a bit confusing. Why such choice ?
LISP --> GO-lang
I am a huge fan / user of Python (which is an interface to C) but that also did take some time to justify itself, no?