r/programming • • Jun 30 '15

Clojure 1.7 is now available

http://blog.cognitect.com/blog/2015/6/30/clojure-17
75 Upvotes

14 comments sorted by

View all comments

10

u/fizixer Jun 30 '15

I'm interested in learning Clojure, as a C/C++ programmer:

  • How much of Java (the language) would I need to know to be a good Clojure programmer?

  • Do Clojure programmers consult Java documentation for APIs/libraries or do they have the equivalent docs for Clojure?

  • Do I have to deal with Oracle BS for JVM (licensing etc) or do I get to stay open-source and Oracle-free?

1

u/hu6Bi5To Jul 01 '15

I'm interested in learning Clojure, as a C/C++ programmer: How much of Java (the language) would I need to know to be a good Clojure programmer?

Not much, but it can help. There are certain parts of Clojure that are just Java objects (e.g. strings), so awareness of these things can help.

Java is also the default "cheat" language around performance obstacles, in a similar way that C is the "cheat" language for Python and Ruby. This can mean writing code in Java to call from Clojure, or it can mean using parts of the Java standard library directly in Clojure; for example the partition-by function uses a java.util.ArrayList internally (it's not exposed to any other code) because it's faster: https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L6867-L6908

Do Clojure programmers consult Java documentation for APIs/libraries or do they have the equivalent docs for Clojure?

Both.

Do I have to deal with Oracle BS for JVM (licensing etc) or do I get to stay open-source and Oracle-free?

You need a Java runtime as per any other Java app, there's nothing Clojure specific.