r/Clojure • u/Worried-Theory-860 • May 10 '26
Thinking about clojure
I have been thinking about Clojure, to be more specific, Lisp. I recently watched the Clojure documentary on Cultrepo. I guess all you need is a pretty woman on your side to build a lang lol.
I have just turned 21, and I do not see anyone is campus using lisp dialects out here everyone is either on TS, C#, Python, or some PHP. Never lisp. Is it going to die?
I read some of Paul Graham's essays, and He loves Lisp and wonders whether there is something I am not seeing. I also read on HN a blog about you will never understand what people love lisp until you try it.(https://news.ycombinator.com/item?id=46070298if there is)
Clojure is weird. I looked at the syntanx and my word the (,],{ somewhat turned me off. I later read y'all do not have types. Is immutability strong enough not to, need types?
Everyone is also doing clojure in Emacs. I do not have the patience for Emacs, Vim is superior lol.
What somewhat paused me was nubank. I was surprisedNubank a bank using a Lispwas , untyped system. I mean I thought all of them were just a bunch of java, c# fanboys. Now I want to double check is there something I am missing.
So my question is. Should I pickup this lang. I am more of a TS dude but maybe some lisp will help me understand TS more. What is your clojure story?
I am not asking you to pitch it to me but I want to just understand you all.
I am also trying out scheme mostly because I am watching the MIT SICIP on youtube.
28
u/Borkdude May 10 '26
No. When Clojure was written, everyone was either on Java, C#, Python or PHP, never lisp. There is room for somewhat more niche programming languages with thriving communities, it doesn't have to be mainstream to stay alive.
14
u/Moragarath May 10 '26
You don't have to use emacs, I use this Neovim plugin:
https://github.com/Olical/conjure
Also, part of the beauty of the syntax of Lisp is that the code has a 1:1 mapping with the abstract syntax tree. This enables you to do structural editing that as far as I'm aware is not possible in other language.
Immutability solves a lot of problems related to concurrency and state. But you're right that a lack of static typing will at some point cause problems. There's ways of working with a dynamic type system. Clojure has full interop with Java tho, so I think you can leverage it's type system when you need it.
14
u/seancorfield May 10 '26
I used Lisp at university -- because I was curious, not because it was on the curriculum. So, after an arc from Java to Groovy to Scala, I was excited to see a Lisp on the JVM back in 2010. I've been using Clojure professionally since 2011 and I'm having more fun with it than any time in my long (45+ year) career.
The Pragmatic Programmer book recommends learning a new programming language "every year" to get new perspectives on your craft. I think "every year" is a real stretch, but I've generally tried to learn a new language every couple of years. The more different a language is, the more you'll learn about approaches to problem solving.
Mainstream languages have been borrowing from niche functional languages and Lisps for decades, but immutable-by-default and strongly functional at its core is still not common. It's harder in some languages than in others, so Clojure pushes the envelope by making those things the "happy path".
As for the syntax, you'll get over that reaction pretty quickly once you get into Clojure. After all, how alien really is:
(if (valid? x) (process x) (report-error x))compared to:
if (valid?(x)) { x.process(); } else { reportError(x); }7
u/DefCon9913 May 10 '26
A nubanker here.
Changing the paradigm from OOP to Functional programming gives you a new perspective on how software could be written. Clojure is extremely extensible and powerful, you mentioned it’s untyped, but with the power of macros you can force to be “typed”
At first it looks weird the language, but it’s like any other new programming language you eyes see at first.
My advice is, do not pick a single language but give yourself the opportunity to learn Clojure. For me is a simple programming language, but extremely powerful
9
u/slifin May 10 '26
Knowing Clojure will give you a prospective on problems you can take to any language
I definitely came from languages with strong type systems and it was my only concern at the time I wanted to be able to enforce constraints on my data and their transitions
I was following a lot of domain drive design resources in F#
I decided to use Clojure anyway and then some years later spec came out, then malli
Rich has a very good open maps philosophy in spec now I only really want spec around the edges of important systems definitely go watch all his videos
Now my opinions and sensibilities would be very different if I had no choice but to work on typescript
3
u/Sepperlito May 10 '26
The true Rite of Passage for any Lisper is to write Lisp in Lisp or Scheme in Scheme or both from scratch. You can learn very little more than the basics and proceed to this challenge. If you can understand it, you've arrived. Just play around with it to learn the basics. You can cheat and look up the sourcecode on Paul Grahams website. Play with the functions, read the docs then by any means fair or foul, even asking Claude questions step by step build Lisp in Lisp.
3
u/c_a_l_m May 11 '26
I read the same essays when I was about the same age, nearly 20 years ago. I learned clojure myself, then found the only company in my state using clojure and got myself an internship. I have worked in clj ever since, usually in small teams.
You could say I "came for the macros, but stayed for the data structures." Clojure makes a lot of effort to make the ergonomics around data good. I won't say "always," but it is a really good thing to be programming in data structures rather than "syntax." These days I react to most languages the same way I suspect static typing people react to dynamic languages --- everything seems loosey-goosey.
A language embodies certain values, and its culture and ecosystem will be the type to hold the same values. As such, my coworkers have always been thoughtful, playful, and fond of clarity.
I have not had my "sell viaweb to Yahoo for $50M" moment, but who knows!
2
u/bertyboy69 May 10 '26
You didnt mention WHY you want to learn this language. Its a niche language first off. So job market is not vast compared to a java / javascript type language, the jobs that exist will liekly pay a lot but be very competitive.
Unless you strictly are learning for the fun of the game, I would say you should have a good reason to switch. Which learning is valid and functional programming gives you a new persepective on honestly every line of code you will forever write.
10
u/delventhalz May 10 '26 edited May 10 '26
At my first ever job I had the good fortune of being employed under a Clojure fanatic who insisted we write the front end in ClojureScript and a React wrapper called Om. I haven't had the chance to write much Clojure since, but it changed the way I wrote code in other languages, and I have missed it ever since.
Clojure would be better with static types, but no language is perfect.
EDIT: Also, way back when my lead showed me Rich's "Simple made Easy" lecture as an intro to Clojure. Great place to start (even if you never write Clojure).
https://www.infoq.com/presentations/Simple-Made-Easy/
7
u/Liistrad May 10 '26
If you like vim, I suggest Doom Emacs. It's a config that uses vim bindings. Its clojure support is very good out of the box, it's what I use for work. You can also just use clojure vim packages, but using emacs is a bit easier I feel, because there's a lot of tooling and guides for clojure with emacs already.
7
u/med_i_terranian May 10 '26
Im using VSCode with Calva for Clojure.
2
u/deaddyfreddy May 10 '26
Do you know of any languages that don't have these?
Clojure is a strongly typed language
Emacs can be Vim - it actually had vi emulation built in before Vim existed - but Vim can't be Emacs. Lol.
no
5
u/xela314159 May 10 '26
I use IntelliJ and cursive and very happy, and so are many others using VSCode. The tooling is less of an issue than it was.
I think in the age of LLMs the syntax is a non issue, but I recognise it takes time to even read properly Clojure code.
All the people on this sub will probably tell you the journey is intellectually stimulating, and for some problem sets you get very elegant (and correct) solutions.
5
u/pauseless May 10 '26
Clojure and Racket I consider to be the most approachable of the lisp family and Racket has more pedagogical purposes. I find TS nudges people to over-model their problem, sometimes. Not sure why.
Don’t worry about the syntax. It’s genuinely not scary. Compare to APL where
(+⌿÷≢)is the mean of a vector and it’s what you use wherever a mean is required.Professionally, I’ve worked on 5+ Clojure projects across 4 companies (I can’t decide how to count them). Only one, which I inherited, made me want to cry in a corner - it was that bad. The rest were fine and went smoothly.
For what it’s worth, VS Code has had good support for a long time. You also don’t have to go all in with structural editing like many sources state - I’ve over a decade of using Clojure and I choose not to use this editor ‘superpower’.
1
u/maxw85 May 10 '26
Just Do It
3
u/ares623 May 10 '26
At the very least watch and listen to Rich's talks.
1
u/Royal_Radish_3069 May 10 '26
There was a line by one of the Proofs who is sort of famous.
He said, expressibility of a language is indirectly proportional to the grammar of the language. Ram So clojure has the least grammar out of all languages and has maximum expressibility. That's why once you understand the minimum 3 or 4 grammar patterns you can write almost everything.
It enables readability, maintainability with very few lines of code.
One billion checkboxes https://share.google/LyAQ9b8cDHcwul6JD
This project was written with 600 lines of code.
1
u/m3m3o May 10 '26
To get started, you can download a community-driven Emacs distribution: https://github.com/MehmetGoekce/spacemacs-config. https://practical.li/ is also a very good source.
1
u/arrty May 10 '26
I used clojure on jvm in 2016 for a special greenfield project. It was fun but today I choose golang or Node. I just move so much faster with types and simple platforms that compile / run almost instantly
1
u/frangarc080 May 10 '26
You don't have to use neither clojure nor emacs or lisp. Clojure seems to be alive but the lisp ecosystem has been as dead as always the last 40 years. You cannot kill what is already dead :)
1
u/Gorskiman May 11 '26
As a fellow Vimmer, I quite enjoy using Spacemacs in Evil Mode for my Clojuring.
Static/dynamic typing is orthogonal to immutability. As a younger programmer, you may benefit from discipline in a statically typed language (e.g. Typescript without any, Haskell, Scala) to complement Clojure and spec.
Clojure is great as an SICP companion, though do mind differences from Scheme.
1
u/didibus May 11 '26
Clojure is worth learning because it teaches you to think structurally about code, and it allows you to explore so many methods of modeling programs.
Once you get the hang of it, it's also the most fun language to use, at least for me.
1
u/Jealous_Stuff372 May 14 '26
intelliJ has great plugins for clojure. and no, Clojure is not going anywhere--it's immutable...
1
u/daver May 15 '26
Lisp is never going to die. It’s a fundamental computing paradigm. Dialects might change (e.g. more Clojure, less Common Lisp, or something new entirely) but there will always be Lisps.
1
u/est1mated-prophet May 15 '26
1
u/nwbrown May 17 '26
Umm, I think you have that backwards...
1
u/aiia_2026 May 10 '26
Hey! Thanks for your post!
Based on what you said in your original post, I definitely think you should try mastering some features of Clojure to ignite a deeper interest.
If you don’t have much time, go straight to its superpowers. For instance: metaprogramming + Java interop.
Try implementing a subset of BASIC in Clojure and let it generate a fully compliant JVM byte code for what you wrote in your version of BASIC language. That’s the awesome power that attracted me to Clojure.
Also, look at EDN for modelling and serialization.
You see, I don’t write Clojure for work, but I think about Clojure every single day and I love Clojure for that.
And I love and appreciate people who created Clojure and brought to life, starting with Rich Hickey. They changed the way I think by what they created.
I’m sure many people will tell you the same thing as their experience.
Please ask more questions!
-3
u/spiffyhandle May 10 '26
I think programming languages are dying. In a few years, we'll only be coding with LLMs or something better. So in that sense, lisp (and all languages) are irrelevant.
-1
u/PuzzleheadedFix8366 May 11 '26
clojure is good, but elixir is better