Are they just in later stages of hype cycle or are they dying out the same way perl did?
For better or worse most of news/fuzz these days seem to be about Rust (not that this translates to actual job postings though).
PS: Asking because I want to delve into a functional language but I cannot bring myself to do this seriously if it doesn't translate into market value.
For local development, you usually just compile+eval one function at a time as you change them, and those happens under 1ms, not enough to even notice (unless you develop with a remote REPL, but then network is to blame)
For server usage, you usually compile once in CI and put the resulting binary/JAR on the server. A few seconds for startup matters less in those cases.
The drama of slow Clojure startup is wildly overblown, because basically for no other use case than writing CLIs, does the startup time matter so much it becomes a problem.
For development, if you're finding "slow startup" to be a problem, you're just doing it wrong: start a REPL and leave it running -- mine run for days (or even weeks).
It only has slow start time, but since you work at an always connected REPL, it's pretty much instantanuous throughout your entire work day. Start it in the morning (takes a few seconds at most), and then it's instant feedback until you clock out.
And for slow start time for deployment use cases that need fast start time, like CLIs, scripts, serverless, you can either use babashka, Clojurescript, or compile Clojure to native using GraalVM.
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..).
If you're working on graphic engines, quants, system programming, you won't really be using a GC language anyways. There, being a better programmer is a lot about low level in the small design details.
If you're instead working on enterprise or consumer applications, backend processing, big data, information systems, saas, etc. There, you'll find Clojure makes you a better programmer, because it teaches a lot about in the medium to large design skills for growing such systems, where high/medium level decisions matters more and micro-opromizations a lot less.
Things that I've learned from Clojure are:
* Better grasp of OOP and polymorphism
* Better grasp of recursion and memoization in general
* Better code structure for independent, modular, and reusable designs
* Better isolation of external effects and internal business logic
* Better, safer and more clear data manipulation techniques
* Better domain modeling and data modeling
* Better handling of data at the boundaries of my application
* Logic programming
* Better understanding of mutation/immutable trade-offs
* Better balance between spaghetti code and lasagna code
* Monads and other functional patterns
* Better use of higher order functions that benefit code understanding, extensibility and reuse
* Better understanding of language design, code parsing and generation
* Better understanding of numbers in general and numeric tower details
* Better understanding of dependency injection and stateful components
* Better understanding of parallel computing and various lock and lock-free designs
* Better understanding of asynchronous and concurent computing, use of events, queues, CSP, future/promise, structured concurency, etc.
* The awesomeness of structural edits, homoiconicity, and Lisp in general
* The awesomeness of interactive live programming
* EmacsMy 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.
Not extremely relevant because it’s Lean 4 and not Java, but destructive updates can help with that:
https://arxiv.org/pdf/1908.05647.pdf
Edit: Now linking to the right paper.
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...
You cannot compare Clojure and Rust in any way as they're completely different design philosophies.
It lacks some polish and has some wierd conventions relative to modern Clojure, but I still use it occasionally.
Do you just mean that things are improving less quickly than they are for, e.g., Typescript?
I think it's a "death by a 1000 cuts"/"broken windows" that is may be happening when the ecosystem lacks funding to take care of the boring maintenancey stuff. If I remember well, this is a conscious choice by Rich Hickey, a choice that one should respect, but will prevent Clojure from ever getting to the next level IMO.
That's actually why it is interesting to compare them. Comparing things that are the same would quickly become very boring.
For instance, one domain where Clojure shines is for complex web apps, as your frontend and backend are in the same language, and can be tightly integrated. I believe dustingetz is working on taking this to the next level.
Compared to that Steel Bank Common Lisp is rock solid and just works. Even the libraries and documentation are fewer but better.
I did learn a lot from watching Rich Hickey's talks so there's that.
Maybe it's just me but I find (SB)CL tooling to be very obscure: ASDF, QuickLisp, Roswell etc. My main issue with it is that it's all written in CL itself and doesn't provide handy CLI tools to execute common tasks (compile app, build package, run tests, deploy etc.). Not to mention that documentation is horrendous.
Basically, I want it to have something like Maven/Gradle/Leiningen to manage dependencies, run tasks and so on. Am I missing something?
I do have a vague (unrealistic??) idea of maybe getting a PT job using Clojure after studying for a year or so. PT because my FT job has amazing benefits and career potential. We will see. As of right now I am just enjoying learning Clojure and Lisp-style language.
I'm not having any luck finding it -- if you find yourself more eager (heh) I'd love to get a link.
https://trends.google.com/trends/explore?geo=IN&q=%2Fm%2F03y...
Rust is 4-5 times more popular in searches that Clojure and F#. Interestingly Scala is around 3 times more popular than Rust in searches.
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.
In my small experience, I've been using Clojure for nearly 4 years to implement real-time ML pipelines.
Yes there commercial jobs out there, yes there are big names that use it, but it’s an increasingly insular community, it’s ceased growing, a lot of people have moved on, and it never really found a niche.
Established programming languages never “die” in the sense of dropping to zero, but to the extent that the question is meaningful, Clojure’s dead.
I believe you that you haven't see much about Clojure over past 2 years of so. But the cause might be that you simply haven't looked at Clojure in the past 2 years of so. OTOH, I've seen plenty of Clojure in the same 2 years. Perhaps most of news/fuzz is about Rust, but I haven't seen much of that, since I'm not following the news sources that talk about that.
In the end, it depends what you want to do. If you want a great programming language with vast ecosystem and decent number of job opportunities, Clojure is still the thing. If you wish to participate in the most mainstream thing, I believe the Python/Java/Javascript is the answer. But then you're competing with 30 million of other job seekers there.
Perhaps Clojure can't rival the Cardashians or Lady Gagas of this world in the amount of news (for better or worse).
The main issue is that there are other JVM languages nowadays that don't suck--that wasn't the case back in 2009. So, if you wanted the Java ecosystem but didn't want Java, your choices were quite limited. You had Scala (just ... no) and Groovy (oh, hell, no) and ... Clojure.
Since then, Java, itself, has gotten a lot better, and there have become a plethora of JVM languages since. In addition, a lot of languages now have "package managers" like lein. They have also adopted "default const-ness". So, a lot of the issue is that things that were unique to Clojure are no longer that unique in this generation of new languages. Finally, the JVM ecosystem doesn't have the same enterprise pull that it did 10 years ago ... enterprise installations back then only had the JVM, while now you can generally count on a version of Python also being installed.
Computer language adoption is slow in spite of what everybody thinks. Pick a language that you can use as a tool for the future, and don't worry too much as long as it isn't actively un-popular. You'll have to learn a new computer language about once every 15 years anyway.
If you're looking for a Lisp that you can use in production then Clojure is your best bet. This is the selling point of Clojure, and why it's unlikely to be displaced by newer JVM languages from its niche.
Clojure may not have the biggest audience but like others said, it generally focuses more on stability, so using libraries that haven't been updated a while is more of a plus-point and don't mean they are outdated.
Personally speaking, Clojure really brought back the joy of programming and i would never willingly go back to developing in a language without a REPL. The tight feedback loop you have while molding a running program in your editor and the constant dopamine drip feed it causes are just too addictive.
Languages that reach the maturity Clojure has never die, they become undying.
There are active Perl groups in some countries. Perl is so undying. Clojure less so, but...
It's a spectrum where Clojure neither has massive adoption (1.51% in SO's 2022 survey [0]) or rapid community growth (compared to hyped or massively adopted technologies).
Clojure is listed as the top paying language in StackOverflow's 2022 survey.
Clojure is an acquired taste. And it isn't a bad one, either!
Seconded; it's pretty jaw-dropping!
> The tight feedback loop you have while molding a running program in your editor and the constant dopamine drip feed it causes are just too addictive.
Well-said -- I've been needing to write some Python recently, and it's only redoubled my preference for Clojure; the Python shell is a poor substitute at best for the Clojure REPL :(
2. These languages were never very popular to begin with.
"I was seeing more HN posts about it in the past" doesn't equate to "the language was popular before and now it's dead.
For what it's worth, I do see some jobs for Clojure in the UK and EU on LinkedIn, not as much as other programming languages, but enough that I think I could get one if I were looking for a Clojure job.
JavaScript ecosystem typically goes by "freshness" and "vanity stats", like GitHub stars or NPM downloads. An average JavaScript developer would check out a GitHub repository and look when the last commit was made, and if it's more than a year ago, decide the project might be too old and possibly abandon, and hence not look further into it.
In contrast, the Clojure ecosystem typically goes by "stability", "maintainability" (simplicity") and therefore age or "last commit" matter less. The average Clojure developer will first look into the code of the repository and make the choice to use it based on the code quality. That the project/library hasn't changed the last year or two matters less and might even be a sign of maturity, that the library is "done" so to say.
As a ex-JavaScript developer (together with many other languages) and now full-time Clojure(Script) developer since a couple of years back, I can only say that the community and ecosystem is more alive than ever, and there is no shortage of either jobs or candidates when you're either looking for work or looking to hire Clojure developers.
Yes, the pay is way more as a Clojure developer, which also means a typical Clojure developer is more expensive to hire than say a JavaScript developer. But for projects where I usually had to hire 2-3 JavaScript developers to hit any sort of interesting development velocity, I find it enough to just hire another Clojure contributor to really hit the ground running.
The real value in writing and maintaining Clojure programs is developer ergonomics. There is no other language that hits as many points as Clojure when it comes to make it simple to write efficient and easy to understand programs. Having your editor connected to a REPL and being able to send code back/forward between the running state of your entire program is such a super power that it's hard to write anything else than Clojure after you've gotten used to it.
However, biggest drawback is that you're gonna have to deal with the JVM sooner or later. When I first dove into Clojure, I had no idea about the Java nor JVM ecosystem, at all, so in the beginning, it took some getting used to the whole thing. But, you don't really have to touch Java the language, mostly details around the JVM, and there is a lot of documentation/material around understanding the JVM, so it's not hard per se.
Overall, before I discovered Clojure programming was mundane and I owe the fun in programming to Clojure wholesale. Now it's hard to do anything else but Clojure. But I'd still recommend anyone curious about functional programming, live editing of programs and lisps in general to give it a serious try. I probably wouldn't be programming anymore if it wasn't for Clojure. That I get paid more than my peers because I do Clojure/Script is just another point for the language, but that's not the main point for me at all.
I’m quite comfortable in a number of languages, especially Python, Java, C++ and Javascript, yet I rarely look at the source code of libraries I use in those languages. With Clojure, it’s something I feel comfortable doing for some reason, so I do it. That does mean that I care more about how easily I feel I can read or modify the code than about when the last commit was (but I definitely do care about how quickly the author responds to comments/issues/PR’s — they don’t have to actually implement or fix anything asked for, just be responsive and offer some pointers, so I know if I ever get stuck, someone will point me in the right direction should I need it, even if I have to do the work myself).
With that said, I’m not currently working in a Clojure job.
It does a very good job at giving developers what they said they wanted, not having to do this constant annoying churn ... and it turns out a lot of people didn't actually want that, they like the churn and the feeling of productivity that merging dependabot PRs gives you.
Thank you for that, I'm now imagining my programming session being interrupted by a pair of little cephalopod people in a Japanese street-facing broadcast booth, announcing what today's acceptable front-end and back-end frameworks are[0]. It seems rather on-brand for... some languages.
I don’t know if it’s dead or not, as I’m sure people still love to use it… it just doesn’t have any major upside that’d make me want to adopt it.
Rust, as you’ve mentioned, is the opposite… huge upside out of the box and easy to adopt, so no surprise it’s getting more talk these days.
> [Rust has] huge upside out of the box and easy to adopt
Probably this depends wildly on the person, but I found the opposite to be true.
I had bunch of languages under my belt before I learned Clojure, but none of them functional nor s-expressions, so Clojure was very different than the ones I knew. Took some while to get used to, but after a couple of months I was more efficient than I ever was in any other language.
On the other hand, Rust took longer time to be as efficient as other languages I knew, even though it was on the surface more similar to what I knew since before.
So for me personally, it was easier to become efficient with Clojure, even with 0 experience with lisps or the JVM, compared to Rust. I think it's mostly about the surface-area of what you can learn to become efficient. Once you understand s-expressions, there is not much to Clojure, besides memorizing various APIs, but that's easy. With Rust, there is so much syntax to remember, and other rules to follow, while in Clojure the syntax is really simple, so once you get it, you will never fight with what the right syntax is again.
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=%...
Clojure is designed to solve hard problems, for people who want something objectively "better" than mainstream tools. That's why it tends to attract more senior developers -- people who've felt the pain of other languages and want something better -- although we also see a steady stream of new developers who are interested in better tools even before they've felt that pain.
Of course it's niche -- it's a Lisp! It's alien. It's "too different" for many companies or many developers to even consider it. And that's fine. The space is big enough for niche languages to thrive and for developers to build careers on them, if they wish to do so.
[0] https://survey.stackoverflow.co/2022/#technology-most-loved-...
[1] https://survey.stackoverflow.co/2022/#technology-top-paying-...
https://github.com/HealthSamurai/matcho
Just got my second job in Clojure nearly getting on for double my before Clojure salary
Having writing Clojure daily for nearly 4 years, my experience fully confirms that survey.
I also noticed the apparent silence around Clojure and its community, which looks like a paradox to me [2]. The Clojure community is actually active and very supportive (the Clojurians channel on Slack incredibly helpful) but it's also very much low profile.
Rich Hickey created Clojure as an independent developer and without extra funding. He's a great speaker, but likely didn't benefit from all the marketing channels available to more popular languages designed in more corporate enviroments, such as Rust and Go.
Being a LISP dialect, Clojure is also quite niche (not the first language you'd learn at school/uni) and definitely not academic, but extremely pragmatical.
Learning Clojure was quite mind bending at first, and I often wondered by my more experienced colleagues kept saying how expressive it is. I now see their point, and get paid quite well for having spent time learning it.
[1] https://survey.stackoverflow.co/2022/
[2] https://piero.github.io/stories/2022/06/23/the-clojure-parad...
Clojure will not die for now, for the same reason that it remains nieche - it's a lisp. Arguably the only viable full stack web dev lisp. And lispers gonna lisp. If that speaks to you on a philosophical/aesthetic level then go for it, you will be in good company.
If you want to try to time the hype market then truly best of luck. However, I think choosing to invest in a language that works for you and your way of thinking will be a less fragile strategy.
I'll keep Clojuring for a while at least, because it's a pleasure. Because it lets me reason where other languages would have me memorise. I find memorising syntax tedious. It's not a silver bullet of course - some things just make more sense for to do in a c/rust type procedural language.
Clojure simply doesn't have the hype around it because it's a mature and conservative language that's not chasing fads. This is a good thing because it's one of the most stable ecosystems I've had the pleasure to work with.
If you're looking for a hip new language then Clojure is probably not for you, but if you're looking to actually get work done using one of the best languages around then look no further.
Even more, Clojure lives on through its various dialects: ClojureScript (JS), Clojure CLR, Clojerl (Erlang), Fennel (Lua), jank (LLVM C++), Ferret (LLVM C++), Babashka, Squint, and so on.
Definitely worth learning, as it will expand your mind; Rich Hickey's talks are some of the most influential I've ever seen.
learn a functional language because you want to learn a functional language. Learn whatever one sparks your interest.
It doesn't matter what one you learn because NONE of them have notable share in the job market. If you learn _any_ functional language you'll have a leg up on other applicants for _any_ functional language job because hardly anyone bothers to learn them. Also, there are so few jobs in functional programming that you're unlikely to get one anyway. So, again, just learn what you want to learn.
If Pytyon has 100 jobs and 100 people then the ratio is 1 If Clojure has 10 jobs and 5 people then the ration is 2 and Clojure has a healthier market for you then python.
Probably a much better idea to not choose a language at the "tons of posts about it" phase of the lifecycle. Pick something that enough people actually use that it is considered too boring to be the hot new thing.
In Sydney, Australia C# and Java have the greatest number of job listings.
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.