Hacker News new | ask | show | jobs
by __pache__ 1045 days ago
It sucks so no one uses it :)
1 comments

I think Clojure had a moment 2015 to 2020ish, but it's passed. People still use it, even though it sucks. What's not to love:

- Incredibly slow

- Hosted on the JVM, so you're going to be dealing with Java eventually

- No automatic tail call optimization because of the limitations of the JVM, so it feels like you're writing a mess of macros rather than real functional code

> - Incredibly slow

Huh? Clojure is one of the fastest dynamic languages. It's not intended to replace C++ or Rust.

> - Hosted on the JVM, so you're going to be dealing with Java eventually

In the real world this is a blessing since there are a lot of useful Java libraries out there.

> - No automatic tail call optimization because of the limitations of the JVM, so it feels like you're writing a mess of macros rather than real functional code

How did you come to this conclusion? Lack of automatic TCO doesn't mean you have to write macros, and most people in the Clojure community will tell you to prefer functions over macros unless it's absolutely necessary.

> - Incredibly slow

Almost as fast as Java, and for performance critic processes 99.9% of the time we bump on infrastructure performance problem BEFORE hitting the wall with Clojure (see https://clojure-goes-fast.com/blog/ for tips and tooling about performance)

> - Hosted on the JVM, so you're going to be dealing with Java eventually

For me it's a major selling point: JVM is battle tested and a wonder of engineering. The Java ecosystem richness is incredible (see tooling above for monitoring and profiling for an example). And the platform is constantly moving forward (see latest JDK with virtual threads, generational ZGC, etc.). And of course GraalVM... (https://www.graalvm.org)

> - No automatic tail call optimization because of the limitations of the JVM, so it feels like you're writing a mess of macros rather than real functional code

Never have been a problem and I don't see the point with macros, and code we write looks _very_ functional...

> JVM is battle tested and a wonder of engineering. The Java ecosystem richness is incredible (see tooling above for monitoring and profiling for an example).

This is all true.

That said, the way I can't help but feel is: keep that entire galaxy of insane bloat two and a half million miles away from me please. :p

It's definitely not over. I got into it professionally in 2018, and have remained employed with it at three different companies. There's turmoil around it because startups use it with great success, but then as they want to scale they have a hard time finding enough devs to throw at their new ideas.
Other replies have covered most of this.

However, I want to point out that sometimes Java can peak its head out. If you rely on Java tooling you will also likely need to have some idea of how Clojure implements things in Java.

So while Java gives us access to a great variety of tools and libraries, heavy reliance on the host can make things a bit more difficult, especially for new programmers.

You have (recur ,,,) for TCO.