Fork me on GitHub

Whenever I need a reminder why I do Clojure instead of Java, I drop into the Java Ranch and read some posts there:


My first thought reading this is "Argh!" but mostly "Even with Java interop, this would be so much easier to read in Clojure".


(and that really helps after the heavy refactoring of legacy Clojure code I've been going through the past couple of weeks -- today we finally said good bye to some code we wrote eight years ago, when we didn't know much about Clojure)

💯 2
😂 1

tangentially related question that I was getting ready to ask anyway...if one had to learn more Java are there resources you'd recommend? Particularly any that might also teach things that would also be useful to know when working with Clojure (e.g. JVM internals, or other things from the Java ecosystem/technologies, if that makes any sense?) For some context, I've worked mostly with .NET for the last 15-16 years. I had some minimal exposure to Java in university CS 20ish years ago and got roped into building a couple Nuxeo plugins in Java a few years ago, but basically learned just-enough to do what I needed. I'm new to Clojure and have been learning over the summer. Now I'm going back to finish the CS undergrad from 20 years ago and I know some of the upper-level coursework is going to be in Java. I managed to muddle through the exemption exams for the OOP and data structures courses but that was enough to convince me I should brush up on Java before I take anything too serious.


learning more about how threads and concurrency works in java is very useful IMO. A lot of clojure features (agents,atoms,future) etc are built on top of classes in java.util.concurrent


threadpools are also an important concept, and usually java implementations are used


Effective Java, Java concurrency in practice, some of the good Java Performance books, Apangin’s posts on StackOverflow and his talks


I have a little bit of time, since, as luck would have it my first course is actually using C89


I'll be very interested in any answers to that. I started doing Java in 1997 so at this point I've no idea what would be considered good introductory resources, especially in the context of Clojure idioms or ecosystem.


My first reaction is: some basic knowledge of classpaths, stacktraces, and if you're actually going to write Java some familiarity with the Function/Stream stuff introduced in Java 8? (so you've got at least some FP-style Java under your belt) I'd love to hear other folks' responses.


(not that I think that addresses your coursework question, just your Java in the context of Clojure question)


thanks, those are the kinds of things I'm looking for. Basically anything for someone with a reasonable CLR background to come up to speed on whatever constitutes idiomatic/clean/modern Java. Anything that might apply in a coursework context would also be a bonus, but I'm fine learning the coursework from the course when I get there. I just don't want to be constantly translating concepts between C# (or Clojure) and Java in my head while also trying to digest something else so just want to get some more actual experience beforehand


probably overthinking it, just odd to be going back to a class setting after so long


Slightly off topic, but while helping to release clj-commons/clj-yaml I accidentally happened to have look at the underlying Java lib which does the actual work. So much code. So I just left.

Endre Bakken Stovner07:09:05

@chuck.cassel Beginner/basic Java/OO: Head First Java. For experienced programmers, Java Core for the impatient seems good. TOC here: You can see that it covers functional stuff like lambdas and streams.