Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I know many people will have problems with this post, but I am posting as information for clorjure-ophiles. Not reasons, but personal reasons why I don't do Clojure and will not try it.

1. When I read about Clojure (repeatedly) I like it. I am especially interested in transducers. I even built a half baked transducer engine in JavaScript using generators. There is clearly something here of value here. Any system that can produce transducers is worth learning.

2. I spent too many years of my life on Java. It was okay until someone wrote a thing in php (!!) in a day that would be have taken at least a month in Java. Maybe two. I understand the "good" of Java, but for me personally, the cost of that good is just incredible tedium. This is personal and I understand that.

3. However, as soon as I get to the part of installing Clojure where you install a JVM, I start hearing voices that say "It ain't me babe" and "Just say no to Java". PTSD?

For a while there was Clojure-script and I started working with that, but it seemed to fall off the edge of the world.

I will happily try Clojure again if it will compile itself or if it does not require the installation of a JVM. [ And last but not least of irrational reactions- anything associated with Oracle is to be avoided like the plague. sorry]

[Edit: then I saw the stuff about Babashka so I will give that a try]



Running on the JVM is one of the best things about Clojure. The JVM is an impressive piece of engineering where uncounted bajillions of man-hours were invested into making a good and performant VM with modern GC.

I've been using Clojure heavily for the last 9 years or so and I can't see any reasons to dislike the JVM. Also, I barely ever touch any Java. You don't need to.


I can hardly write a correct Hello World in Java. I can read it, I can probably write it, but I've never really used it. Yet I've been writing Clojure daily for the last 9 years.

This means that you really don't need Java in order to use Clojure.

Coming from a C++ background, I used to dislike the JVM out of principle just like yourself, especially since it needs to run on my local machine and it uses so much memory and is slow to start up.

However, once your app is started, you're in the REPL and that's the only time you need to start your app.. You can keep developing for days without restarting your app once.

Once I finished developing my app and I deploy it to a server, I'm kind of happy it runs on the JVM - that thing is super tuned, very fast and runs on a myriad of hardware platforms.. I don't have to spend one minute thinking about those details.

So while the JVM is somewhat inconvenient on the dev machine, it helps a lot when you deploy it to production.

Things became a lot simpler when I stopped worrying about it and just used the language for its power and beauty.


And if you do need to touch Java for reasons Clojure doesn’t impose, the interoperability story is really good.

I’ve done this with internal libraries - it’s easy to get them pulled into a Clojure code base, wrap them in such a way that the ergonomics of the rest of your code aren’t ruined, and still treat them as a first class citizen for stuff like your build system, artifact stores, etc.


Clojure 1.12 (which is nearly done) is going to add a bunch of interop support - method values, array class syntax, Clojure fn -> Java functional interface conversion, stream support, etc.


Yes — and thank you for this work! Java functional interfaces were the only thing I was wishing for in the Clojure/JVM story. They will help me simplify code that interfaces with FoundationDB.


I also cannot stand Java (not the technology, but everything surrounding it - bean factories, J2EE, Tomcat, war files, maven, insane unhinged class paths etc) but honestly one of the reasons Clojure is amazing is that it allows you to exist inside of the Java ecosystem while also being pretty isolated and walled off from it. It's all the good parts of Java without all the bad annoying parts.

I would urge you to push thru the PTSD and give it another shot.

There is also Clojurescript, which runs on Javascript, and Babashka which is a lighter weight implementation of Clojure for fast startup times that is targeted at things like shell scripts or system programs. https://babashka.org/


Some dialects at various states of maturity:

CLR: https://github.com/clojure/clojure-clr

LLVM: https://jank-lang.org/

Erlang: https://www.clojerl.org/

Python: http://hylang.org/


> It was okay until someone wrote a thing in php (!!) in a day that would be have taken at least a month in Java. Maybe two. I understand the "good" of Java, but for me personally, the cost of that good is just incredible tedium. This is personal and I understand that.

You understand that this has everything to do with Java and nothing to do with the JVM, right?


It's everything to do with the libraries people pick and not Java the language. Java the language can be extremely concise and expressive. Stop picking Spring and Java becomes fun again.


PHP avoids many of the hassles of deployment that pretty much any other language does.


Slowly repeat after me... "Java and JVM are not the same thing." Do it ten times every morning.. jk. JVM always gets a bad rap because of Java. Matter of fact, JVM is an incredibly good piece of tech.


> I spent too many years of my life on Java. It was okay until someone wrote a thing in php (!!) in a day that would be have taken at least a month in Java. Maybe two.

Really curious to hear what that was, because I'm having a hard time believing that is true.




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

Search: