Hacker News new | past | comments | ask | show | jobs | submit login

That's a major appeal of Clojure, the Lisp (not Lisp-style) syntax, the functional paradigm (and the idioms are great). I really don't want to write code that corresponds line-by-line to Java. If I wanted to do that, I'd just write Java. However, Java interop with Clojure is straightforward. Furthermore, Clojure allows one to solve problems with an "orientation" toward objects, but as one learns to write Clojure well, the language guides one toward sublime and elegant functional solutions. An important thing about Clojure, however, is that it is not tied to the JVM; The original and most well-known implementation is for the JVM, but not only is there also Clojurescript, there are implementations that compile to CLR bytecode, Python, Ruby, and Actionscript. And with EDN, the extensible data notation, not only can you have your front-end and back-end codebases entirely in Clojure, you can transfer and store your data as Clojure too. I know not everyone has the same aesthetic tastes as I do, but I do like to think that there is something beautiful about this.

Finally, I must say that while Scala does indeed have a first-class web framework in Play, web frameworks are first-class objects in Clojure. Joke. Sort of. I personally do not want to have a monolithic pre-packaged web framework to bow down to; the Clojure community is a community of hackers, we like to make things out of other things, and to take things apart. Clojure and the work of its community allows me to compose my own web framework as needed very very quickly–and to drastically change it just as fast. I'm not saying you should stop doing what you like to do, but if you gave Clojure a chance...dude: it's addictive.




> I really don't want to write code that corresponds line-by-line to Java. If I wanted to do that, I'd just write Java.

The code I write now is nothing like Java, but it's a question of how you get from there to here. When I started Scala I wrote what I'd write in Java. In the first week I removed the semicolons. In the second week I started to use function literals. Then I started using match/case. Later I found out about for/yield with futures. And so on. I learnt the language at my job, and I was delivering real, user-facing features in it from day 1. I don't think I could've done the same with Clojure.

(Reasonable people can disagree on syntax; I find that Scala's lets you get very close to the language of the domain (e.g. see the Spray "routing DSL") and that's worth the cost it imposes on the macro system)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: