18 ms·
Why Clojure?
- moi2388 2y agoBecause you want the type safety of lisp with the simplicity of the jvm /s
- gleenn 2y agoYou are being snarky but I'll take immutability over types and interoperability and access to a vast and stable ecosystem over the simple and extremely limited and underperforming alternatives. Thanks for the segway. I also cannot understate the reasoning ease that comes with basically everything being a static, top-level function. Testing never requires mocks because you can redef any function anywhere trivially when you otherwise would reach for a mock which tends to be painful, complicated, and requires comlex mocking libraries. Even with immutability by default, you get an extremely performant platform that usually stomps on nearly all the dynamic languages you might otherwise choose like Python or Ruby etc. And you get first-class functions and a concise and extremely stable language that is a joy to program in. Thanks Rich and Alex!
- AnimalMuppet 2y ago> I'll take immutability over types and interoperability OK. > Thanks for the segway. A segway is a motorized transport; a segue is a transition to a different topic. So this could be considered a type error, and demonstrates why you need types, not just immutability.
- slowmovintarget 2y agoWhile amusing, I still disagree. Complex static type syntax ends up infecting your code, because the syntax becomes load-bearing. A change to one type has a tendency to ripple through the entire body of code. This means you have tight coupling as a consequence of the syntax, which is a bad trade-off. Clojure's strong dynamic abstract types allow you to focus on the function of the code instead of its structure. Trying things out in the REPL first helps you find many of the things that you might need to wait for a compiler to find. There are studies that estimate that the kind of bugs shipped to production that strong static types help prevent account for only 2% of defects. The rest are things like off-by-one errors, design errors, and incorrect logic. The other thing a static type system can help you with is reading code. But it's primarily an aid to people unfamiliar with the language, or put in more popular parlance a "skills issue." We know tooling can navigate the code, because we have tooling that does so (language servers, CIDER, Calva, Cursive, Conjure...). This means that static typing for the purpose of merely reading the code is a crutch. I'd argue it's also a crutch or training wheels for writing correct code. You can't run with crutches. You can't corner well with training wheels. Clojure is meant to make the expert nimble and fast. The main thrust of its design is to make experienced devs more productive, like professional tools without novice guide-rails make experienced craftsman more productive. Rich Hickey gave a talk where he mentioned this idea of guardrails on the highway. He told a story of how we all get in our car, then bump into guardrails all the way to our destination... right? Of course not, we learn to keep the car in our lane of travel, to signal others when we switch, and to blend with other traffic on the way. (Rich was talking about TDD, but it still applies to static type systems, IMHO.) Clojure is that power tool without all the novice presets. It's the automobile we keep away from the rails when we drive it. Mutable state is arguably responsible for far more defects shipped than type errors. Mutability is only a thing because hardware constraints required reuse of memory locations instead of allowing for persistent data structures. Thankfully, for "situated" applications that start and operate for extended periods, those constraints aren't so tight. If you have to choose between immutable data and static types choose immutable data. But why not both? We can have all our luxuries, right? Because you have to spend so much more time proving things to the compiler, you have so much more syntax to manage. More code and more syntax for the same problem is almost always worse. I'll take Clojure.
- AnimalMuppet 2y ago> There are studies that estimate that the kind of bugs shipped to production that strong static types help prevent account for only 2% of defects. The rest are things like off-by-one errors, design errors, and incorrect logic. If you've got a reference, I'd be interested. (Not saying you're wrong...) > The other thing a static type system can help you with is reading code. But it's primarily an aid to people unfamiliar with the language, or put in more popular parlance a "skills issue." It's an aid to people who are unfamiliar with the program, who have no idea what the shape of "that thing" is. (Especially, what is the shape of the thing that this function gets called with? For all possible callers?) I've been hired to start working on code bases that have existed for a decade or two. Static, stated types are a life saver. Sure, they may slow you down while you're creating the code. It's easier to not have to explain everything that's in your brain. But when you and your brain leave, and I'm left with a bunch of variables that I have no idea what type they are - what are the maximum set of types that they can be for all paths through all callers - then I really need static types to help me figure out what's going on.
- slowmovintarget 2y agoOr you need a REPL that lets you poke at the living code. It's just different.
- Capricorn2481 2y agoI think their point is, even with the REPL, it takes time to track down every spot that function might be called and figure out what was passed to it. A type is very easy to see localized on the function.
- iLemming 2y ago> A type is very easy to see localized on the function. "You Keep Using That Word, I Do Not Think It Means What You Think It Means"... When you say "types," can you please give a concrete example of what languages you're talking about? Whenever someone talks about Clojure from type theory talking points, they make it sound like it's completely untyped or weakly typed. Clojure has its own type systems, and you can express things in them that are far more difficult to do in some other languages, even with static types. It is also a strongly typed language, and in practice, I feel far more confident about our Clojure code than anything written in TS or Java. Sure, static type systems have their value, and some of them are really nice. In practice though, whenever I have to jump in to deal with Java, Typescript, or even Rust code - there's so much seemingly unnecessary fluff, and I don't feel the practical worth of dealing with types - it almost always feels taxing. Haskell/OCaml is a different story - I can buy that one. But realistically, getting to the point of writing practical software in Haskell is an incredibly bumpy road, and (relatively) few programmers successfully achieve good milestones on it.
- synthc 2y agoImmutability removes so much accidental complexity, it makes whole classes of mistakes dissapear. I'd also take immutability over types. Clojure sort of guides you to simplicity, building everything out of functions and simple datastructures has big advantages when testing and reasoning about code. I do find that in larger code bases, Clojure lack of types causes friction (spec is just a bandaid, not a fix). There are languages with immutability and types (like Haskell), but these don't have the get-shit-done factor I seek.
- yogthos 2y agoI've used Clojure for over a decade and the JVM has never been an issue. The only people I see complaining about the JVM are people who never actually worked with it. Meanwhile, there's zero evidence for the notion that static typing has any impact on code quality. https://danluu.com/empirical-pl/ https://danluu.com/empirical-pl/
- huahaiy 2y agoFor someone who needs static typing, Clojure give them defprotocol, deftype and defrecord. Interestingly, most of the low level libraries in the Clojure ecosystem are programmed that way. If you open up the code of many popular Clojure libraries, you see defprotocol everywhere. So really, Clojure does both: dynamic typing for application programming, mostly static typing for infrastructure library code. As they should be. This tired argument of "Clojure bad for dynamic typing" just doesn't hold water. Keep repeating it is a sign of lack of critical thinking.
- yogthos 2y agoI'd argue defprotocol, deftype, and defrecord provide much weaker guarantees than a type system. Dtuff like defprotocol tends to serve a similar use case to using an interface in Java. You specify the signatures for the functions, and then a concrete implementation can be provided using a library. Ring servers are a good example of this where you can easily plug different server implementations by just swapping a library. There is Typed Clojure https://typedclojure.org/ https://typedclojure.org/ for people who want actual static typing, but the fact that it never caught on suggests this wasn't a real pain point for most people using Clojure. As other people mentioned, immutability tend to be a more important feature than static types because it makes it easy to write code that's referentially transparent. You can structure your whole application as a series of small components that can be reasoned about in isolation.
- huahaiy 2y agoNobody would argue that Java is not statically typed. That's my point. Clojure offers the same as what Java offers. If you write code in a defprotocol everywhere style, as many Clojure libraries do, your code won't compile if you got the types wrong. The same as Java. How's that not static typing? Which part of that is weaker? So what exactly this "Clojure dynamic typing" nonsense is about, I fail to see. Automatically inferred type system is not the same thing as static typing. Typed Clojure is the former. Typed Clojure did not catch on, but static typing style of Clojure did, as many Clojure libraries do exactly that: internally, defprotocal everywhere, externally, some Clojure functions to give the illusion of normal Clojure code. BTW, that's the style how Clojure itself is written in as well.
- iLemming 2y agoClojure is strongly typed. That manifests in, for example, when Clojurescript emits compiled Javascript. Surprisingly, often it emits safer Javascript than Typescript ever could with all its static types. Typescript's type system exists only at compile time for development and static analysis. When compiled to Javascript, all type annotations and interfaces are removed, leaving code that runs dynamically at runtime, meanwhile Clojure retains its strongly typed guarantees. Coders often accept the status-quo of things - "So what that we can't easily upgrade our dependencies in our Node/Ruby/Python project - it's a known thing, we just have to deal with it..."; "Of course our builds take 90 minutes, that's normal for a big project"; "We need complex state management like Redux"; "Code must be recompiled after every change"; "Testing requires mocking everything", "Type safety prevents runtime bugs"; etc. Yet, when it comes to actual work, not some cheap talking points but real, practical scenarios - there aren't many other tools that can beat Clojure for robustness, pragmatism, and speed of building things with it. Most experienced Clojuristas are incredibly knowledgeable, skilled, and seasoned programmers, architects, and system designers who are passionate about their craft, using tools, techniques and patterns that enable them to perfect it while remaining pragmatic and grounded. But hey, don't blindly trust my word, go see for yourself - open ClojureTV YT channel, watch their presentations and draw your own conclusions.
- KingMob 2y agoNot the OP, but usually, when people talk about type safety, they're referring to some flavor of static typing, not strong typing. Very few languages still in use in the modern era are still weakly-typed. My personal take is that while a lot of type systems can be overblown, nil-punning is not a sufficient substitute for optional/maybe types.
- jrsj 2y agoElixir is a little less flexible since it doesn’t have the JVM interop but for domains where it’s a good fit I think it’s even better at most of this stuff (and easier to teach people unfamiliar with FP or lisps)
- deleted 2y ago[deleted]
- nbittich 2y agoI tried clojure long time ago, honestly what made me give up is when I saw a java stacktrace in place of a proper error message when learning it. Also the repl was slow. The UX sucked, I wonder if they improved that
- jb1991 2y agoThe repl isn't slow, what are you referring to?
- ekzy 2y agoProbably referring to startup time. Larger apps solve this with the “reloaded” type of workflow (https://www.cognitect.com/blog/2013/06/04/clojure-workflow-reloaded https://www.cognitect.com/blog/2013/06/04/clojure-workflow-r...)
- jb1991 2y agoI would often leave repls running for days so it never seemed to matter.
- gleenn 2y agoThere are no Clojure stacktraces specifically, only JVM/Java ones. Clojure sits closely beside its host so there is no difference. People do complain about stacktraces and they've made some improvements. But they are long because the abstractions run deep and the function you passed in might be on the stack at the very bottom with the actual origination of the cause.
- fiddlerwoaroof 2y agoI used to hate JVM stacktraces but they’re incredibly useful and I miss them when I’m using other ecosystems these days. The way JVM exceptions do “caused by” when an exception is thrown while handling another exception gives so much more information than other languages. It’s also relatively simple to filter out the noise when you want a concise error message: just remove lines that start with a tab. CIDER (the emacs IDE for Clojure) does a really good job of filtering the stack trace and presenting several views depending on what you care about. L
- oldpersonintx 2y ago[dead]
- ilrwbwrkhv 2y agoI run a multi-million dollar business which I started with common lisp. I since moved away to go and then rust but I've been looking at clojure again lately. For a team that needs to get s** done and has more per employee productivity than Faang combined it's hard to beat the speed with which you can build things when you have the repl and interactive programming. The jvm while doesn't have great error messages is a fantastic runtime.
- giancarlostoro 2y ago> which you can build things when you have the repl and interactive programming. This is how I use Python to be honest. If I'm unsure of something, I just bust out the REPL.
- ilrwbwrkhv 2y agoI know people talk about python being Lisp without brackets, but for example in SBCL and in other lisps like clojure I could just run a larger function, figure out that there is the wrong output, change a tiny function in it, eval that, eval the larger output, get the result. In SBCL there is also the break loop which is just magical. I do not know how you do that in python without using a debugger and stepping through the code line by line. To be fair I used Python only a little bit almost a decade back. Are things more interactive now?
- zelphirkalt 2y agoI think in Python REPL you just have to redefine the whole larger function. I am not aware of a way to access internally bound identifiers, or even modify what values they are bound to.
- int_19h 2y agoFor starters, those identifiers aren't bound until the function actually runs.
- codr7 2y ago
- MarkMarine 2y agoLearning clojure has improved all of my programming in every language. I’m in love with the simplicity and smallness of it. Rich said one of the reasons he built it was he was programming like this already (pure functions acting on data) but the languages he was using didn’t support it well. There is a lot to be learned and applied even if you can’t use clojure at work every day.
- DeathArrow 2y ago>Rich said one of the reasons he built it was he was programming like this already (pure functions acting on data) but the languages he was using didn’t support it well. But he could have been using F#, OCaml, Haskell. So it might not be just about pure functions and immutable data.
- yogsototh 2y agoFor being an Haskell and Clojure dev. Data manipulation in Clojure requires a mind shift coming from Haskell. But it feels a lot more straightforward in Clojure. Even if `lens` is incredible. This is like Haskell lenses was were included in the core language if you want. Of course, not type-safe. This is just that, solving problems in Haskell or in Clojure does not really require the same approach. But both ways are delightful. And personally, Clojure has always felt more natural, even though, I also love the Haskell approach.
- MarkMarine 2y agoRich has talked about all of this, it’s all on YouTube if you’re curious. https://youtu.be/nD-QHbRWcoM?si=yneAgMhk6NjTf9ZU https://youtu.be/nD-QHbRWcoM?si=yneAgMhk6NjTf9ZU The video I remember when he was describing the origin was on 480i, I’ll try to find it
- ampunix1337 2y agoIdk ... it feels Clojure stalled since Nubank bought Hickeys company. Worst thing: spec is still in alpha !! I put so much on this ... but nothing really happened since ... idk 8 years?
- ekzy 2y agoCall it “stalled” if you like, it’s stable and it’s pure joy. I can just get stuff done with Clojure. And things that may seem inactive, like that lib that you need that hasn’t had a commit in 8 years, turns out that it just works and doesn’t need to change. This is commonplace in Clojure. Spec is still alpha and I’m not sure it will evolve more or if it’ll be something completely different. At least they’re not pushing you down the wrong path. Use/look at Malli instead of spec.
- tombert 2y agoThere are things in the core language that are still kind of bullshit. The thing that gives me the most headaches is how annoying it is to use Java libraries that have the lambda syntax. You can't just pass in a Clojure `fn` into a Java lambda function. You have to `reify` the interface and implement the single method. It's annoying and verbose and frustratingly the equivalent code is considerably cleaner in Java as a result. I know that this is a product of how Java implemented lambdas by having interfaces with a single method, and I'm not saying that it would be trivial to add into Clojure, but I don't think it's impossible and I think people have been complaining about this for more than a decade now. So while I love Clojure, it's probably my favorite language, I do get a little annoyed when people act like it's "stable" because there's nothing to fix.
- mattmein 2y agoI think that particular issue was addressed in the recent Clojure release [https://clojure.org/news/2024/09/05/clojure-1-12-0 https://clojure.org/news/2024/09/05/clojure-1-12-0] ("Clojure developers can now invoke Java methods taking functional interfaces by passing functions with matching arity.")
- codr7 2y agoTried to love Clojure, but found it to opinionated as a daily driver for me. Sometimes I just need to get some code running to see a result, which is my main use case for Lisp. I used to default to Common Lisp, but it needs a lot of scaffolding to become ergonomic, and even then it has too many quirks to be really enjoyable for me. So I started designing my own: https://github.com/codr7/eli https://github.com/codr7/eli
- thom 2y agoWhat wall did you hit? I can jump into a Clojure REPL without needing a project or even any files.
- codr7 2y agoThe opinions on data and programming in general-wall. Not bad ideas, just not the kind I like shoved down my throat.
- cellularmitosis 2y agoMacros being supported via quoted arguments is clever
- codr7 2y agoThank you, I'm very pleased with that detail :)
- viccis 2y agoI like Clojure well enough, but it feels like every single time I see it mentioned now is an write up trying to justify using it.
- iLemming 2y ago> justify using it Justify using it against what? Can you name a single other language that does things better than Clojure? Not from your "point of values," but try seeing it from my position. Is there anything that can replace Clojure for me? I love the dynamism, malleability of the language - the flow; writing Clojure programs for me feels like playing a video game - it's plenty of fun. I don't get the same kicks from literally any other "mainstream-ish" language that's being used today. I like Common Lisp, but I have never had any practical, large opportunities to use it seriously, and there are things that I love in Clojure that I'm sure I'll miss in CL. I like Haskell, but it's even less practical (for me). In my view, there isn't a single language that respects good ideas carried in Clojure and does them in a better or at least pragmatically viable fashion - I've evaluated Elixir, OCaml, Rust and some other choices. I am excited about Jank, can't wait for it to hit the first production-ready release. But today, nothing is more joyful for me to use than Clojure/Clojurescript.
- kunley 2y agoHaha, it is "against what" that you have added by yourself. And that's exactly the issue with this kind of posts and comments: going right away into either a very defensive mode or a fight mode.
- cmbothwell 2y agoWhat was it about Elixir that you found dissatisfactory? I am currently evaluating Clojure vs. Elixir for a new project.
- innocentoldguy 2y agoI spent a lot of time objectively evaluating languages for a new project I built several years ago. Elixir won out. It has now been 12 years and I still believe Elixir was the right choice for the following reasons (this list is not exhaustive): BEAM handles concurrency better than the JVM. Elixir threads are implemented using private memory where Clojure uses public memory. Mix is superior to Clojure’s tooling. Elixir is easier to learn and write. OTP is fantastic. Phoenix is an excellent web framework.
- phtrivier 2y agoThe part about the "stability" is a bit surprising - in my experience, I try playing with clojure about once a year, and every time, everything is different (I mean, I had to go through classpathes, then lein, then boot, then deps.edn - what is the current way to "try and run a program" du jour ?) Also, is running your "hello world" still going to be incredibly slow, or has something changed in the core system (I know I'm supposed to fix that with graails. Or is it babashka ? Or something else, I suppose.) It's really sad, because i just love the language. Reading about clojure is a pleasure. Trying to write anything has always been a blocker to me, though. Maybe that's the true "immutable" nature of the language ?
- cschep 2y agoWhile clojure has gained (accreted) more options of ways to run things, every single one of the ways you mentioned still work! It’s extremely stable in this regard. Nothing was taken away because there is a new hotness. Sure, things were added. Why is that bad at all?
- Lyngbakr 2y agoPersonally, I prefer it when there is a solid default tool chain for a language rather than having to choose from one of several. That way, I know pretty much what to expect when I open any project in that language. I feel like this is one of the few places where Clojure dropped the ball and that deps.edn should've been there from the get-go.
- newlisp 2y agoUsing Clojure without Datomic can be frustrating since you feel like you lose some of the language's value, as you likely want to extend its philosophy and style to the database as well. Of course, Hickey probably knew this when he started planning Clojure, which is why he also created Datomic. However, Datomic can be a hard pill to swallow
- jwr 2y agoHard disagree: I never used Datomic and likely never will, and I don't feel like I'm "losing some of the language's value". Datomic is a database. You can use any database you like.
- newlisp 2y agoDatomic feels like a natural extension of Clojure for storing data—you get no impedance mismatch, you continue working with Clojure's data structures for storing, querying, and writing data instead of dealing with clunky query builders(or SQL strings), and you gain immutability. Sure, you can use any database you like, but then you're playing the same game as every other programming language, ultimately getting less value out of Clojure and making it feel like just another language—at least for applications that require a database.
- jwr 2y agoI disagree. I tried to use datalog and it was not a natural extension at all, because of the lack of nil handling. I also found that I do not need (or want) full immutability. I would not compare it to SQL: I do not use SQL because there is no distinction of in-band and out-of-band data (your data and your commands/queries travel in the same channel, which causes a world of pain). But there are other database approaches that work very well. It's not a problem at all to serialize your data and store native Clojure data structures, even better than datomic does. In other words, I disagree that Datomic is somehow natural or superior: it is "a" database, excellent for certain applications, not necessarily the best choice for every application.
- huahaiy 2y ago
- dustingetz 2y agoWhy Clojure = for Datomic, Rama, Electric and Missionary. No need for long blog post - this stack screams if your app fits within its intended operational margins - e.g. enterprise cloud information systems and rich interactive web products.
- felideon 2y agoAs someone who worked with Common Lisp many moons ago, this is the answer I needed to pique my interest in Clojure (again).
- d_t_w 2y agoMy co-founder uses the phrase minimal-viable-company for maximum-viable-product. We bootstrapped for 5 years to well over $1M+ ARR before recently closing a seed round[1], Clojure played a large part in our ability to deliver as a small team. Also in our general happiness as programmers, it is a nice language to work in. We will grow our Clojure core product team over the next couple of years, but mostly the funding round is about balancing our business to keep up with our product delivery. Clojure has been very good to me (I had 15 years on the JVM prior to moving to clj/cljs in 2013-ish). YMMV. [1] https://factorhouse.io/blog/articles/from-bootstrap-to-blackbird/ https://factorhouse.io/blog/articles/from-bootstrap-to-black...
- jasebell 2y agoDone me fine for the last decade. Along with all the other languages that kept me in employment. I still use it daily.
- fernirello 2y agoArne has written, as usual, an excellent piece. Not only it argues its intended points, but it can also be followed by everybody-it brings readers up to speed without assuming any significant background knowledge.
- moomin 2y agoWho are these articles for? I feel like Clojure’s value proposition is pretty well understood, and every last Clojure pitch can be relied upon to make the same exact points.
- jwr 2y agoThese articles are necessary to counteract armchair critics who are afraid of unfamiliar things and feel insecure. This crowd is loud: you can hear the choir of "but no one is using it, I tried it once and there were parentheses, I tried it and it was too hard, I hate the JVM" — there needs to be a voice that says it works (and works well!) for some people. FWIW, it works for me — I would not have been able to build and run my business without Clojure. The long-term stability is an especially important trait, under-appreciated by people who do not have a business to run.
- rednafi 2y agoIt’s probably geared toward someone like me. JVM and parens are one angle. Another is that I get paid to work with distributed systems and databases, and Clojure isn’t even part of the discussion in that sphere. Go, Rust, and the usual Python and Node dominate there, so it’s hard for me to care. However, I dislike language monoculture and am curious about why people like the things I might not care about. This blog is for those.
- jwr 2y ago> distributed systems and databases, and Clojure isn’t even part of the discussion in that sphere I'm not sure what a programming language has to do with distributed systems and databases, but as another data point, I happily work with distributed systems and databases, using Clojure :-) (see also https://jepsen.io https://jepsen.io which I would very much call a "part of the discussion in that sphere", written in Clojure)
- huahaiy 2y agoI thought distributed system is exactly one of the things that got Clojure going to begin with. Remember Storm? As to databases, there are a fountain of databases emerging from the Clojure ecosystem: Datomic, Datascript, Datalevin, XTDB, and friends aside, there is Rama, which is a distributed database (or to replace database?)
- kstrauser 2y agoI’ve never used Scala or Clojure, but I heard them discussed a lot in the same circles in the late teens. It seems like Scala kinda vanished from common mention. Whatever happened to it, and what made Clojure take off?
- spoaceman7777 2y agoI think the Java 8+ functional APIs/streaming/etc. kind of stole Scala's thunder. Java has all of the necessary tools to replicate the functional style of Scala now, and it's a lot easier to hire for, so :/
- kstrauser 2y agoAh, got it. So it’s not to much that Scala went away, as that Java became Scala?
- valenterry 2y agoNo, not at all. It's just that Scala was hyped at a time and now it is a mature and stable language and hence "boring". How often you hear of a language online does not reflect how much it is actually used. Nor does it reflect on how good the language is.
- vips7L 2y agoIn my opinion, the people who went to use Scala were in two categories: people who wanted functional programming on the JVM and people who just wanted a better Java. As Java progressed and Kotlin launched the people that wanted a better Java either stuck with Java or moved to Kotlin. Personally, I think Scala is a fantastic language, but it's had breaking changes, a functional only ecosystem, Java -> Scala interoperability is HARD, and the language is complex. Now there is Scala 3 and there are more breaking changes and the tooling landscape hasn't caught up.
- KingMob 2y agoI think this is a mistaken assumption. Scala was always more popular than Clojure, and even now, I just checked with Google Trends, and Scala's still searched for 4x more frequently.
- jwr 2y agoAs a data point: I've been running my solo-founder SaaS business for 10 years now using Clojure. It changed my life. It would not have been possible without Clojure and ClojureScript, building and maintaining an app of this complexity would have exceeded my limits. The article is excellent and I agree with everything in it. The stability of the language is unbelievably useful. I look around and it seems it isn't valued in many other ecosystems where people have to rewrite their software regularly. I can't afford to rewrite my app. There will be plenty of armchair critics here, with cliché knee-jerk reactions (parentheses, JVM, startup time, etc). If you intend to form an opinion, I would suggest you read only into the insightful posts, from people who actually used the language, or from critics who present well thought-out criticism, not just a shallow knee-jerk reaction.
- stickfigure 2y agoYou will find that "whatever language you are most familiar with" is the only one that you will perceive makes it possible for you to build whatever you are working on.
- jwr 2y agoThat is a shallow take and I disagree — at least in my case, I make a conscious effort to avoid being a Blub programmer and regularly try different languages and look at different ecosystems. The choice of Clojure and ClojureScript for this application was not accidental, and it wasn't the thing I was most familiar with at the time. There are good reasons why I said it was only possible with Clojure and ClojureScript. Conciseness, expressiveness, long-term stability, the ability to share business logic code between the client and server, same language used for data serialization (e.g. no JSON), good async code support (core.async), transducers for code reuse and performance, and more.
- rednafi 2y agoIt’s great, and I learned a ton from Rich Hickey, despite not fully grokking Clojure or FP in general. I briefly worked at a small Clojure shop with an extremely talented crew. People were excited about FP and writing real business logic with it. My stack was different there. The problem started when the honeymoon phase ended, and the codebase grew as the business gained traction. Dynamic typing became a burden, and once the key people moved on, they struggled to hire developers who wanted to write Clojure. Also, JVM juju shooed many away. After I left, a coworker told me they had started rewriting part of it in Go, and that was going alright. Now, their stack mostly consists of Python for LLM stuff and Go for the main backend. There’s still some Clojure running legacy systems that haven’t yet been migrated over.
- chamomeal 2y agoI’ve been having a lot of fun messing with clojure, but the dynamic typing really grates on me. At your clojure job, we’re y’all using spec? I haven’t looked into it yet, and I’m wondering how much it mitigates the annoyances of dynamic types
- rednafi 2y agoIt was in alpha stage and changing rapidly when they were considering it. But it’s similar to Python’s type hints and isn’t enforced by the compiler. However, that’s better than nothing.
- noodletheworld 2y agoIn what way is clojure.spec similar to python's type hints? O_o
- noodletheworld 2y agoI don't think spec with solve issues you are having about dynamic types. Spec is about asserting structure at domain boundaries; once you're inside a context, it will not do anything. i.e. If you're connecting stuff together and you want to make sure the state is correct as you pass between contexts -> great! If you're writing stuff and internally you miss having a strong type system... uh... I don't think it's really going to help you.
- iLemming 2y agoI love writing Clojure. Whenever I say that publicly, there are inevitably some voices challenging my stance with skepticism, criticism, and attempts to discredit whatever I say provides practical value for me. Then I have to explain to them, "no, it's not the only language I know," "yes, I've used dozens of other languages before," "yes, including languages with robust static type systems as well." And you know what? Finally, I realized - I don't have to explain to anyone in exact detail why I have not found the same deep love in C, C#, Python, Javascript, Typescript, Ruby, Go, Java, Kotlin, Swift, Lua, Haskell, and many others. Why do I need anyone's permission to love a tool? I love it, and I love it for many reasons - theoretical, practical, emotional, fiscal. Sure, I can get behind your excitement for Rust, Kotlin, OCaml, Elixir, Julia - you name it, but please, please do not try to "educate" me about my choices. I don't care about YOUR personal predicaments with Clojure/Clojurescript/Babashka/nbb, even Fennel. You find Clojure not to be worthy of your time - it's YOUR loss. My love for Clojure is not due to MY skill issues, not the result of MY inexperience, not because "I'm in a bubble," or "I don't know any better," or have zero knowledge of type systems, category theory, OOP or design patterns. Sure, Clojure is not without deficiencies - no tool is ever perfect. Yet pragmatically, no other programming language in the category of general-use PLs today satisfies me more than Clojure, no other language is nearly as joyful to use. I'm sure at some point my stance will change, I will find some other "perfect" language for me, and 100% guaranteed - it will too have some deficiencies and people will be arguing for the merits of choosing it for the job. Until that day, let me just say it again - "I fucking love Clojure!"
- j45 2y agoThe use of prejudice type behaviour towards others using a particular programming language based on hearsay or unknown is not ok, but also not something new. The few folks I know using it are very happy with it, and are very experienced, and talented talented polyglots themselves. For that reason I'd not rule it out, even if I'm not looking to make a jump or change, but I might try it out.
- golly_ned 2y agoI've never seen anything but praise for clojure.
- patcon 2y agoI've worked around an open source Clojure codebase for a few years. I've grown to dislike Clojure by virtue of the culture it apparently fosters. As a community organizer in some vibrant decentralized spaces, reading articles from inside the community gives me ick feelings. There's a strange phenonemon involved when you have a diehard community that continually extols the virtues of the language, while the popularity of the language itself halves its open source marketshare every few years. I mean, you have to try really hard to cultivate a community of people who have a deep love for something, but for some reason can't see what is actually wrong with it that drives ppl away. Passionate users are usually a boon, but apparently not for Clojure. But people somehow seem to build great companies with it. It's strange, and very specific to Clojure culture. I can't help but assume its failure to capture market is tightly tied to its leadership style and/or leader worship. Anyhow, these are just hot-takes from the margins. I'm sure that passionate users will have something to say, or maybe downvote me.
- j45 2y agoHow to support the creation of beginners might be a different topic (and not a new one to technologies) to the offer of the technology itself. How was your experience in working with the existing Clojure codebase?
- patcon 2y agoVery true. Thanks for noting that. The codebase was democracy-related civic tech software. I was a bit biased against Clojure because I wished for the world to show up in the codebase, but it was written in an uncommon language that scared away most every coder who showed up with curiosity. Probably just the wrong language for the culture I wished to exist around the software. Plus the maintainers used Rich's essays to emphasize their desired ethos of "singular vision" development, which I admittedly became resentful of.
- patcon 2y agoI thought of an analogy later, which perhaps colors my experience -- writing democracy software in Clojure felt disappointing, loaded with a power dynamic kinda like the Catholic bible and service being conducted in Latin before the 1960s. It was not a language "of the people". And not just in how uncommonly known it was, but even the philosophy in how the language governed itself. It felt harmful to me: the cross-pollination between the ethos of the Clojure project (via the well-intentioned developer who brought pieces of Clojure culture into conversations and discussions) and the democracy project.
- hlship 2y agoI've been working in Clojure now for about 12 years. Maybe 12+ years of Java prior to that. I've created some great apps, and great libraries (in both Clojure and Java). I often describe Clojure as "the least worst programming language", which is an off-handed complement, but I think accurate. Things you don't like can generally be fixed (at least locally) using macros and libraries. The core is strong, a good basis for building things ... and as described all over this thread, stable. As you master your tools, you gain a level of speed and precision in your work that I have not found elsewhere. The REPL-oriented workflow is a central value proposition in Clojure, and many features (and a few limitations) of the language exist to properly support it. Working in Clojure feels like I'm working "with" my code, molding it like clay. My prior experiences in Java and Objective-C were so much slower, with long code-compile-test-debug cycles that are compressed down to instantaneous responses in the running REPL.
- rootnod3 2y agoHaven't worked much in Clojure, but I have the same experience with Common Lisp. The malleability and live image workflow is just very pleasant to work with.
- erichocean 2y agoClojure is like that, but because data structures are default immutable, and all of the standard library (and the vast majority of 3rd party libraries) are also default immutable, the stress level is much lower. You can still get mutability and I do this on every project. But it's a very small percentage of the code, less that 1%, and also well-defined. Something like FlowStorm [0] isn't really practical in anything but Clojure, and things like Clerk [1] are easy and very natural. [0] https://www.flow-storm.org/ https://www.flow-storm.org/ [1] https://clerk.vision/ https://clerk.vision/
- rootnod3 2y agoI know. What I just miss in other implementations is the live reflection in the SBCL REPL via Sly/Slime for example. And conditions. When I do CL, I try to code it in a more immutable style and avoid things like self until I get my own version bootstrapped.
- lemper 2y ago> Positive self selection for hiring candidates > "But what about hiring?" When you use any language that isn't in the top 3 of currently most popular languages, you will get this question. JavaScript programmers are counted in the millions, Clojure programmers in the tens of thousands. How will you ever find the required talent? is it just me or i, for the love of whatever that is holy, find that fp related jobs are so few and far in between? not only clojure, but also f#, haskell, etc? to be honest, fam, if you want to sell a language or two, at least make it possible for people to make a living in it. sorry to say, mate, but my kids can't eat a "lovely" niche programming language. p.s., i actually have some working exp. in haskell yet nobody approached me because of it.
- DeathArrow 2y agoAs I skimmed trough the article, the most important pros of Clojure seem to be: REPL, functional language, immutable data, dynamic typing. I wonder what would happen if someone adds a REPL to F#. Sure, it wouldn't have dynamic typing, but isn't static typing good for large code bases? In particular, judging from the article and comments, it seems that the major boon is having an REPL integrated in the IDE, running in the background, so you can have feedback while you are writing the code. Having such an integrated REPL for a language like Python would make the productivity up to par with Clojure? I am trying to understand if Clojure has a particular feature other languages can't add with ease.
- fhd2 2y agoI use Python with a REPL in Emacs, it's relatively similar. The two important differences to Lisps I see: 1. Syntax. It's a bit easier to just evaluate a symbolic expression (put in a simplified manner: anything enclosed by parentheses) than to select a region of Python code to evaluate. But it's no major issue. Don't know about any syntax that has similar properties, Ruby seems to be somewhat similar in spirit, every expression returning an object. Python OTOH has all kinds of constructs you can't evaluate readily. 2. Functional code. Lisp code is generally largely side effect free, Python is not. That goes from the libraries down to how you write your own code by convention. Evaluating code without side effects for quick feedback is a breeze. For side effect riddled code, it's kinda easier to just use unit tests with mocks etc. for that. There are lots of languages with good functional libraries nowadays. Generally speaking, the things you list are what used to be unique about Lisp. But apart from the two points I'm making, I don't believe that's the case anymore. Lots of languages got inspired in the last few decades. I love Lisps and I wish I could use them more, but I'm happy lots of popular languages got reasonably close.
- neonsunset 2y ago> I wonder what would happen if someone adds a REPL to F# F# does, in fact, have REPL and excellent one at that! There is F# interactive and F# scripting. It's my workhorse for all sorts of automation and quick "analyze data and draw a chart" style of one-off scripts. It's vastly superior experience because when editing F# scripts you get full LSP, ability to reference nuget packages without vendoring anything, etc etc. Gradual typing and full type inference make it look at times like dynamically typed language but it's anything but and gives really nice user experience. https://learn.microsoft.com/en-us/dotnet/fsharp/tools/fsharp-interactive/ https://learn.microsoft.com/en-us/dotnet/fsharp/tools/fsharp...
- vim-guru 2y agoI've been working with Clojure on and off for over a decade, and I've found it exceptionally efficient at solving a wide range of problems—making it one of the best general-purpose languages available. However, I sometimes envy the capabilities of OTP, which provides a straightforward way to build fault-tolerant servers without the overhead of managing containers or databases. Additionally, while the growing number of compile targets in the Clojure ecosystem is impressive, it can also create confusion for newcomers. Whether it's compiling to native code with Jank, generating quick script snippets with Babashka, or using subsets of ClojureScript like sci or cherry, the diversity is both a strength and a challenge. I believe a concerted effort to unify configurations across these targets would help streamline the ecosystem and make it easier for developers to choose the right tool for their needs.
- aquariusDue 2y agoI too am excited about Jank but I thought it wasn't even hobby project ready yet? Also yeah, I agree that Babashka is a delight. I've been using it to manage a Caddy server via Caddy's JSON API and it worked great, super flexible.
- hewrin 2y agoI would have loved to continue working in Clojure but the jobs just aren't there. I spent 2 years trying to get a job and and couldn't even get an interview. 2 weeks of Ruby on Rails searching got me 2 interviews.
- clusterhacks 2y agoSimilar experience. I now think of Clojure as a power tool for small shops and consultants. These aren't the kind of places that typically cast a wide net looking for "employees." Most of the opportunities are maybe more focused on proving that you can bring in business and network effectively enough to be a known quantity in the Clojure community.
- tobyhinloopen 2y agoHow do people feel about Clojure on the client? (Javascript replacement)
- rrgok 2y agoI would like to learn ClojureScript for webapp development with react. But, in 2025, I don't know how to get started. In 2024 I had the same problem. Lein, Shadow, Deps? What do I have to use? How do I get started with REPL driven development? Any in depth video-tutorials on how to take advantage of nREPL in 2025? If I want to use React, how to use third-party packages? Should I use reframe, fulcro, or retit with ohm? Everytime I try to start I give up because the ecosystem is confusing. What is the right way? And if I want to develop in clojure fullstack (frontend and backend both in clojure/script), what is battletested approach? Oh well, I forgot: how to use with TailwindCSS 4? What incantation of build system do I have to configure for live-reloading when classNames changes? Sorry for the rambling. Just a poor confused user.
- yogsototh 2y agoOne part of the joy that came with using Clojure is that there isn't really any bad choice. For example, I wanted a quick and dirty internal web application for admin purposes. I went with reframe. Why? Because I wanted to try it. And I knew, that I could get things done with it. This is probably not the easiest "framework" (not sure this is a good name for it) but it was very fun. I think, if I had to progress from just a toy to a really strong, user facing UI, I think it would still be a pretty good choice. If some feature is missing, or something doesn't work as I would have liked, I know it will not be difficult to correct it myself. I know that this could feel overwhelming, but this is freedom in a world where you expect there exists a single "best practice". As long as the tool is powerful enough it will be fine. On my end, I appreciate the fact there is not a single "web framework" in Clojure. Instead you have tons of libs you can use that work well together because they are all tied with a few common concepts (like ring for example). If you don't like to choose the libs. There are a few people that provide a starter pack with somewhat nice bundle of libs in a single system like pedestal or luminus for only citing two of them. My recommendation is to not lose too much time looking for the best choice. Most of them will be good.
- ddmichael 2y agoYawn.
- nokun7 2y agoI recall when I used to work for Pupper Labs - then PuppetDB jumping to Clojure in 2012 was a gutsy call that totally paid off and put the language on the map. Puppet was a Ruby shop, but as data piled up, they needed something really cool and risky—enter Clojure, which we though was a slick Lisp running on the JVM. It turned PuppetDB into a beast for storing catalogs and reports, leaving Ruby’s old setup in the dust with crazy speed boosts, like 130 times faster for some tasks, thanks to its async magic and functional vibe. We could’ve gone Java or JRuby, but Clojure’s concise code and JVM power hit the sweet spot, making PuppetDB a lean, scalable backbone for thousands of nodes. It wasn’t just a tech switch—it showed Clojure could hang with the big dogs, influencing Puppet’s later projects and proving a niche language could rock real-world infrastructure. It was the best move and kept thing really interesting - in a good way of course.
- dartos 2y agoIs the elixir+erlang ecosystem less stable than clojure’s
- slifin 2y agoIf you are using Clojure please look at this: https://www.flow-storm.org/ https://www.flow-storm.org/ If you can get past the serviceable UI then it's coding nirvana literally looking inside the program Pair that with a good test suite so you can trigger lots of different scenarios and you're in heaven
- rjinman 2y agoCouldn't agree more with the necessity for fast feedback loops. I've experienced the opposite, and it's not fun. I worked with Clojure/ClojureScript (mostly ClojureScript) for a couple of years many years ago. It was the first time I'd worked professionally with a functional language, so I made a game of minesweeper in my free time to help get to grips with it: https://github.com/robjinman/cljsmines https://github.com/robjinman/cljsmines Back then, I fully bought into the idea that functional language like Clojure were the future, especially on the web. The way application state is managed is perhaps the key virtue of functional programming - if you get it right, you can design your program to consist mostly of completely pure functions. I remember how enlightening that was once I understood it.
- dotemacs 2y agoSomebody brought up a point about outdated documentation. Currently https://clojuredocs.org https://clojuredocs.org is sort of the go to place. It wins due to Google algorithm. I wanted to add the ability to vote on answers provided there. So that you have the ability to see the most relevant/popular answer, rather than the oldest. Raised an issue on the repo, four years ago now. No response: https://github.com/zk/clojuredocs/issues/222 https://github.com/zk/clojuredocs/issues/222 And why do I mention Google algorithm? Because there was another effort that tried to create a (debatably) nicer documentation, but due to lack of Google traffic, it died. See: https://news.ycombinator.com/item?id=8027119 https://news.ycombinator.com/item?id=8027119 For a more eloquent argument on its uses, see this blog post: https://metaredux.com/posts/2019/06/29/farewell-grimoire.html https://metaredux.com/posts/2019/06/29/farewell-grimoire.htm...
- kaliszad 2y agoThe two things I ever enjoyed that is some kind of programming was building a pipeline in shell to process data and for the last almost 5 years writing Clojure and ClojureScript. We are now 4 guys writing Clojure with 30+ years of Clojure experience added together. I participated as a co-founder in a front-end heavy project in Clojure/ ClojureScript and more than a year ago started a Clojure-preferring consultancy in Prague, Czechia. For stuff like Inter-dealer broker trading system it's a no-brainer. For many other things as well. Even for distributed systems/ higher level infrastructure stuff it might be a good choice to get going at least.
- asa400 2y agoI love Clojure. I has influenced me more than any other language. It is without question the single most coherently designed programming language I know. I've written a fair amount of it, contributed to libraries, some of them core, so I hope folks don't interpret this as drive-by criticism. The biggest problem I had (and still have) with Clojure is that, even in its heyday (circa 2014-2018 or so) I couldn't convince people to keep using it. It seemed like every smart, senior engineer I knew tried it, loved it, wrote load-bearing stuff in it, and then walked away: either abandoned it at their companies, abandoned it for personal projects, or started companies using other languages instead of Clojure. And this was when Clojure was hot shit. Big Data was all the rage, and everyone had heard of or was using Storm. Clojure was the language. You might counter that maybe me or the people I know are fools, not smart enough for Clojure, or picked stupid languages for the wrong reasons, or followed the crowd, or whatever else. And you might be right! But all I know is that the smartest people I know tried Clojure, learned it, respected it, learned a ton from Rich about how to think about systems, and ultimately walked away, because they were, variously, repelled by what they perceived as: - the elitism in the community - the elitism in the core team - the impenetrability of the tooling and the unwillingness of anyone to admit that it sucked - the sometimes not so subtle denigration of their skills as professionals for having the audacity to, for example, use web frameworks rather than build everything from scratch I bring this up because for me programming is social. I love being able to write code that does something fun and/or useful and tickles that part of my brain that loves expressing what I want in a beautiful way, but ultimately it's more useful to be to be able to write code that my friends and colleagues can understand and are willing to use. So I have to wonder, is it sustainable for a community to be as reliant on true believers as Clojure seems to be? Is it sustainable to alienate as many of those folks who maybe aren't true believers, but who would love using it anyway? Who knows, maybe it is! But I can tell you: I'm Clojure's audience, and I don't use Clojure today, and none of my now-Staff and Principal and CTO level friends are using it or teaching it to the juniors on their teams or choosing it for their companies. Why? Wouldn't it be better if we were?
- stefantalpalaru 2y ago[dead]
- fithisux 2y agoNow LISP has the big three. CL, Scheme and Clojure. Each introduces a fundamentally different way of thinking and all come from standards or standard implementations. There is also Newlisp, more akin to R and Julia and other LISPs each bringing some new things on the table. Still you need to have an idea from the big three to appreciate what LISP is all about.