Hacker News new | ask | show | jobs
Ask HN: Introduction to the Java Ecosystem for Someone Wanting to Learn Clojure?
10 points by jacobu9 4601 days ago
I've never been been particularly interested in Java, but I've found a recent interest in Clojure. The problem is that, despite being a separate language, Clojure - along with its documentation, tutorials, and general usage - is heavily tied to the Java ecosystem.

As someone with a strong background in and working knowledge of C, C++, Python, C#, and other imperative languages, I have little interest in learning Java as a language, but feel somewhat lost when dealing with the baggage that comes with a language built on the JVM.

Is there a good tutorial or resource out there that outlines the basics of the Java ecosystem (e.g. JRE implementations, tooling, a basic outline of .java/.class/.jar/etc files, a very general outline of the Java standard library, etc), but does not try to teach Java as a language, or at least only introduces the very minimal set of constructs of the language necessary to understand the ecosystem?

Given the long history of Java, I feel it would be hard enough to find a reasonably up-to-date guide on Google, and even more difficult to find a guide for an experienced programmer looking for just a cursory glance. Any suggestions?

2 comments

Leiningen does dependency management and builds, etc., for Clojure work. http://leiningen.org Note the sample project on that page.

http://clojure.org/cheatsheet is made of useful also

The community won't bite, ask when you're stuck.

Use the Oracle jre, or your package manager's default (linux).

There's this stuff if you need it. http://docs.oracle.com/javase/tutorial/essential/environment...

Good luck!

I'd suggest skipping Clojure altogether. The JVM cannot support tail call optimizations. Use of recursion will be muffled a bit. Not very lispy.

Newer is not always better. Try racket or common lisp.

I would respectfully disagree and perhaps my reasoning is incomplete as I am a Clojure newbie. However, the absence of tail call optimization has not been a limiting factor in my case; I have been developing clojure code ,which I am sure is non-idiomatic, that is effectively doing the job.

On the other hand, JVM ecosystem is vast. It means acces to the latest database drivers ( Oracle, Sybase , etc.) as well as NOSQL drivers. Almost all third party REST API providers( ASW, Google, etc.) provide java wrappers that you could use in your Clojure code.

The loop/recur syntax gives you recursion in constant stack space.[0] It was a bit of a speed bump coming from Scheme but it's just part of being on the JVM. Personally, I'm more than happy to take some ugly TCO syntax if it comes with the all the good stuff Clojure inherits from Java.

[0] - http://clojure.org/special_forms#Special%20Forms--%28recur%2...