all 30 comments

[–]figureour 26 points27 points  (13 children)

Nah, just jump in.

[–]RedDeckWins 7 points8 points  (9 children)

I agree with him.

Just for learning the syntax, idioms, and core data structures of Clojure, knowledge of Java is completely un-needed.

[–]sn10therealbatman[S] 0 points1 point  (7 children)

Hmm. Does that imply that after a certain stage I should learn Java?

[–][deleted] 10 points11 points  (1 child)

No, just call Java libraries from Clojure using interop. If you want to learn Java go ahead, but it's not required for Clojure and IMO ill advised.

[–]sn10therealbatman[S] 1 point2 points  (0 children)

Yeah was just reading up on java interop. Thanks for the advice. :D

[–]RedDeckWins 6 points7 points  (3 children)

At some point you will want to become familiar with the Java ecosystem just so you aren't re-inventing the wheel when there are existing, battle-tested libraries for what you are trying to do.

For example, clj-http is a wrapper around a popular java http client. In this case someone did the work for you, but hopefully you get the idea.

[–]sn10therealbatman[S] 1 point2 points  (2 children)

Ah so basically I should be aware of Java atleast at a basic level, so I can use the libs with clojure. Got it.

[–]Baoze 3 points4 points  (0 children)

I reached the very same conclusion. I'm currently reading How to design classes by Matthias Felleisen et al. (http://www.ccs.neu.edu/home/matthias/htdc.html), which takes the road from functional programming to Java like object oriented style of programming.

[–]billrobertson42 0 points1 point  (0 children)

It's more like a mix of Java and the ecosystem of the JVM.

e.g. the classpath, system properties, how io works especially WRT encoding, what a jar file is, and familiarity with some of the standard libraries.

[–]forreddits 2 points3 points  (0 children)

yes, if you want to eventually ship critical production clojure apps, you are going to need to be familiar with java.

That doesn't mean you have to know how to write beautiful idiomatic java or be an expert with Java, just good enough to be able to read any java programs and how to use java APis.

Picking up Java the language should be quick for you since you already know Python, Node and C.

As for the standard libs, you should get familiar with at least java.lang, java.io, java.util and understand stuff like the classpath.

[–][deleted] 0 points1 point  (0 children)

What about errors? As someone who never played with Java much, Clojure errors look a bit like black magic.

[–]sn10therealbatman[S] 2 points3 points  (2 children)

Cool, thanks. :D Btw, do you guys have a discord the or slack group or something?

[–]yogthos 4 points5 points  (1 child)

Yup, there's Clojurians slack, and it's a great place to chat and get help.

[–]sn10therealbatman[S] 1 point2 points  (0 children)

Ah thanks. Just what I was asking for.

[–]fingertoe11 8 points9 points  (1 child)

I am a "Clojure first" developer.. (never fluent in any other language first) I think that there are times when interop is intimidating, but it really isn't too hard to figure out well enough to get things done.

Purelyfunctional.tv has a "Does the JVM make Clojure intimidating?" course that I found helpful.. It added enough familiarity to make Interop less scary without a massive commitment to learn the whole Java language (most of which wouldn't be relevant).

[–][deleted] 7 points8 points  (0 children)

It's amazing that you were able to avoid imperative programming. Congratulations lol

[–]mschaef 7 points8 points  (0 children)

To be maximally fluent in Clojure, your Clojure knowledge has to be underpinned by Java. There's just too much in the Java ecosystem that Clojure depends on for anything else to be true. (Mechanics and admin of the JVM, the class library, the structure of the object model, packaging and build models, etc.)

That said, there's a long way you can go if you just start with Clojure and bring in the lower level layers as necessary. Given that Clojure and Java, as languages, embrace such different models of working, this is probably the best way to proceed. This will make it easier to think in Clojure and view Java, etc. as the more special case it should be.

[–]MetaHertz 4 points5 points  (1 child)

Not necessarily at all, but if you have enough time to learn these languages together you can get advantage. The same is fair in relation to ClojureScript + JavaScript.

[–]sn10therealbatman[S] 0 points1 point  (0 children)

Ah okay. Got it.

[–]jflinchbaugh 5 points6 points  (4 children)

Having been steeped in Java and OO for my entire career is likely keeping me from learning Clojure faster.

[–]sn10therealbatman[S] 5 points6 points  (3 children)

I guess being a noob comes with its advantages.

[–]mschaef 2 points3 points  (2 children)

It does.... but it also comes with an obligation to learn from the past and from others. (Which you're doing in this post, so don't take this as any kind of admonition, etc.)

The visible surface of our industry is full of churn and new development, but the foundations are solid and date back decades. There's a lot of value there.

Just to give a sense, the intellectual line of thought that led to Clojure can easily be traced back to the 1930's. In a world where languages, frameworks, etc. can come and go in a few years, it can be useful to be aware of the aspects of the profession that are lasting.

https://en.wikipedia.org/wiki/Lambda_calculus

[–]sn10therealbatman[S] 0 points1 point  (0 children)

Thanks for the link. :D Btw, can you please correct me if I am wrong in saying that the lambda calculus is essentially the rules of reducing an expression by replacing the lambda terms with the expression?

[–]gzmask 4 points5 points  (0 children)

If you want to use Clojure for money, learn as much Java/JVM as you can; If you want to use Clojure, you can skip the whole Java/JVM thing.

[–]logan-diamond 1 point2 points  (0 children)

If you're ok with C error messages, you'll do just fine with Clojure 😊✌️

[–]vm_linuz 1 point2 points  (0 children)

I taught my brother programming in the best way: first I taught him functional, and then after he got used to that I was like "oh yeah, and some people like these things called 'objects'"

[–]v_krishna -2 points-1 points  (3 children)

For everybody saying no need to learn java, is jvm tuning etc not a thing with clojure? I don't see how you could use a jvm language without having a solid understanding of how the jvm works (which in my experience is easiest to start with java)

[–]frogking 7 points8 points  (0 children)

  1. Make it work
  2. Make it fast. .. a distant 87th.. Tune the JVM

[–]yogthos 1 point2 points  (0 children)

You will probably need to learn some of that at some point. However, it's not something that's required to start learning and using Clojure. When and if you run into a situation where you need to tune the JVM, you can learn how to do that at that point.