Live data from Hacker News

Ask HN: Is Clojure Dead?

news.ycombinator.com

41–50 of 145 posts

Re: Ask HN: Is Clojure Dead?

#41
It's not DEAD as in no one is using it. A good friend who's crazy into Clojure still gets pinged a lot about Clojure jobs, but most of them are asking him to port Clojure to something else. Even he admits that as other languages' ecosystems continue to grow, Clojure is slowly being pushed to the background. He just finished a job to port Clojure to Python on some financial processing engine.

Re: Ask HN: Is Clojure Dead?

#42
post #28

Earlier quoted context omitted.

can you clarify "how" it makes one a better developer? When I think of how the java streams API is used, it generates lots of garbage (i.e. lots of intermediary allocs), doesn't always make things clearer.. i'm genuinely curious (and in fact i like the streams API, it's just often misused by collecting at the wrong step..).

I think it helps you better understand how data flows through you program. My input is A, and I need to create D. A -> A', then another function makes B, then another makes C, then another makes D. You can reason about and relatively easily test each of these steps. However, testing in a repl gets quite messy with calls such as h(g(f(x))). In python, you'd need to decorate you functions with an input/output logger.

Testing in a repl is easier and not messy at all if you use the Clojure arrow macro: (-> x f g h) You can see each step clearly, and build each result on top of what you did previously.

Re: Ask HN: Is Clojure Dead?

#43
post #5

Clojure is not dead, the core language is still very strong, but the dev experience has been degrading IME. This is due to a lack of heavy corporate backing and investment, probably by choice. Taking a PL to the mainstream is very expensive. You cannot compare Clojure and Rust in any way as they're completely different design philosophies.

I like Clojure the language but what I found frustrating was that even more than in other ecosystems a package would get momentum, become popular, and then mysteriously die suddenly without any real replacement. A classic example was the statistics package Incanter -- it had the potential to become a new version of Xlispstat for the 21st century and then it just died.

Re: Ask HN: Is Clojure Dead?

#44
I would not say it is dead at all.

There are still Clojure jobs and new companies using Clojure.

It is a niche language, and I think it will stay a niche language, but that is fine.

Re: Ask HN: Is Clojure Dead?

#45
post #28
post #14

One benefit of learning functional languages, whether Haskell or Clojure, is that it makes you a better developer in other, non-functional, languages.

can you clarify "how" it makes one a better developer? When I think of how the java streams API is used, it generates lots of garbage (i.e. lots of intermediary allocs), doesn't always make things clearer.. i'm genuinely curious (and in fact i like the streams API, it's just often misused by collecting at the wrong step..).

I can't speak about Haskell, but Clojure's lazy sequences also generate a lot of intermediate allocs.

For example, here's Clojure's implementation of `map`[1]. It internally uses `cons` to build a cell[2] and `map` to recursively walk the collection (but all wrapped up in `lazy-seq` to delay evaluation).

Transducers[3] do help with this if you are applying a stack of collection transformations. But, and this is just my opinion as a very occasional Clojure user, transducers are harder for me to grok and so I generally avoid using them. If I was doing performance critical work, I might try to build up a better mental model.

My biggest complaint about the Java streams API is that it makes it hard to write your own stream transformation functions. Or rather, you can, but then calling them is awkward. You generally transform a Stream by calling instance methods - e.g. `myStream.map(::f)`. But since Java doesn't have extension functions, there's no way for you to make a custom function callable in the same way as the built-in functions. I ended up writing a small shim to build a stream pipeline without using member functions. You would use it something like this:

    newPipeline(stream)
        .then(map(::mapFn))
        .then(filter(::filterFn))
        .then(customTransform())
        .collect(Collectors.toList());
Contrast that to Clojure, where everything's a function:

    (into []
      (customTransform
        (filter filterFn
          (map mapFn collection))))
Or (using the threading macro, I think this is right)

    (->> collection
      (map mapFn)
      (filter filterFn)
      (customTransform)
      (into []))
Or (using transducers, I'm really not sure if this is right)

    (into []
      (comp
        (map mapFn)
        (filter filterFn)
        (customTransducer))
      collection)
        
                      
[1] https://github.com/clojure/clojure/blob/2b3ba822815981e7f769...

[2] https://github.com/clojure/clojure/blob/2b3ba822815981e7f769...

[3] https://clojure.org/reference/transducers

Re: Ask HN: Is Clojure Dead?

#46
post #5

Clojure is not dead, the core language is still very strong, but the dev experience has been degrading IME. This is due to a lack of heavy corporate backing and investment, probably by choice. Taking a PL to the mainstream is very expensive. You cannot compare Clojure and Rust in any way as they're completely different design philosophies.

I like Clojure the language but what I found frustrating was that even more than in other ecosystems a package would get momentum, become popular, and then mysteriously die suddenly without any real replacement. A classic example was the statistics package Incanter -- it had the potential to become a new version of Xlispstat for the 21st century and then it just died.

Yeah it is too bad Incanter stalled, it could have been an great alternative to Python's data science stack (pandas/numpy/matplotlib) if it had gotten traction at the right time.

It lacks some polish and has some wierd conventions relative to modern Clojure, but I still use it occasionally.

Re: Ask HN: Is Clojure Dead?

#47
post #31

Earlier quoted context omitted.

I mean compared to a few years ago. I tried setting up a new project after 1 or 2 years away from the ecosystem, and struggled a lot : all existing templates to set up new projects (esp. with CLJ/CLJS combined) had bitrotten and were not usable out of the box ; emacs integration no longer working out of the box, etc. I think it's a "death by a 1000 cuts"/"broken windows" that is may be happening when the ecosystem la…

I've very recently changed my system from MacOS to Linux, so I've been reibuilding my Clojure environment from scratch. I've found the exact opposite in terms of maturity; Emacs support in particular is far more complete and usable out of the box than it ever was. I installed Spacemacs fresh, loaded up a Clojure file, and not only did I get automatically get CIDER, but I also got LSP support via clj-kondo and a bunch…

Hi ! I am ever so grateful for all the work you've put in over all these years, to get the Clojure ecosystem where it is today.

What I am kinda saying is that Clojure would be in a better place if it was paying people like you a lot more!

Re: Ask HN: Is Clojure Dead?

#48
I can say that I (like many others) have built a thriving career on Clojure. I like to change jobs every couple of years, and I've never yet had any trouble finding a Clojure job I'm excited about (and I only consider well-paid remote jobs with friendly teams with companies doing something I feel good about). The community is mostly active on the Clojurians slack (currently ~24,000 users) and clojureverse.org.

So -- it's a niche for sure, but a very successful niche, and one that many people are very happy in. There aren't a ton of jobs out there relative to, say, Python, but there are also fewer people competing for those jobs, so it works out fine for individuals. It can be tricky to find your first Clojure job, but I think that's true in most languages.

I plan to stick with it for the foreseeable future, because there's no other language that I like nearly as much, or can be nearly as productive in.

Re: Ask HN: Is Clojure Dead?

#49
For the US, Google Trends reveals that Clojure's heyday came in 2013, and it has been on a decline since[0]. It never really reached the interest level of Scala, and of course recently Rust is consuming all the air in the room.

Except, just for kicks I add Golang, and it turns out that all of the above are marginal compared to Go[1].

HN posts are very different from general interest, but yeah, I'd go with "Clojure has sadly missed on its shot to become a popular general-purpose language" rather than "Clojure is dead," but your instincts seem right.

0. https://trends.google.com/trends/explore?date=all&geo=US&q=%...

1. https://trends.google.com/trends/explore?date=all&geo=US&q=%...

Post reply on HN