Live data from Hacker News

Why Clojure?

gaiwan.co

181–190 of 302 posts

Re: Why Clojure?

#181

As 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…

> 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...

Re: Why Clojure?

#182

I 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…

So I think people probably hear "I love clojure" and take it as advocacy. I mean, maybe it isn't supposed to be advocacy, but "I keep hearing people say they love X" is a decent reason to start using something, and I think people are influenced that way.

When you're writing software you benefit from libraries the community made, and lots of people end up writing libraries and contributing back. It's possible Zig is much better for C, but they're failing to gain users due to lots of C developers continuing to use C for new projects, whereas if there were more users maybe the Zig ecosystem would be larger, making it easier to write larger pieces of software.

And I think basically all software is a collaborative effort. Users have investment in tools they think are useful, and frequently contribute or even take over maintenance on critical software. In that case they need to deal with whatever technical decisions that project made. Even commercial software can be abandoned as a buggy mess due to technical choices forcing users to migrate, or eventually open sourced (blender, doom, etc) in which case private technical choices become public. Also I think a lot of people have been forced to contribute (i.e. professionally) to projects that initially made very poor technical decisions and have been scarred by it.

No tool is perfect, and abstract technical debate is awful, but I think it's hard to say there isn't worse and better software, and I think it's worth the effort to put in effort to debate to try to discern and move from worse to better tools since the whole community benefits that way.

Edit: re-essayed

Re: Why Clojure?

#183

The 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 kno…

> everything is different… I had to go through classpathes, then lein, then boot, then deps.edn All that stuff still works and I don’t think any of them broke their APIs? A lot of people still use lein for example. You’re talking about new choices coming along, which is a good thing. Of all the ones you listed, only one is a product of the core team, so it’s not like there has even been “change” on any official level…

> If your mindset is, “I need to be on the latest hot thing” that’s about you, not Clojure. You’re allowed to keep building your projects using any of those tools, they still have the same capabilities.

Beware here: it might sound natural to you, but many (and I many _many_) people are working on stacks where "there has been no update to this lib for 6 months" means "the project is discontinuated and has been replaced by something else, it's a waste of time."

So, it might be worth adapting the messaging. For example, there is an awesome-clojure page with a kitchen sink of every possible libs, some of which are dead, and some of which might not be.

Is there a "boring-clojure" page, where, sure, not everything is awesome, but you can be confident that using this lib and that tool and that IDE is going to, basically, "just work" for the foreseenable future ?

Re: Why Clojure?

#184

Idk ... 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?

But have you seen flow ? I don't think it's stalled at all, and Nubank seems to have become an enabler to the ecosystem. I mean, Datomic is free to use! [core.async.flow]: https://github.com/clojure/core.async/commit/03b97e0b3e0ec32...

I really don't understand what flow is and what problem it solves. I've read the commit comments and some posts but I still don't get it.

Re: Why Clojure?

#185
post #93

I'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…

Maybe I miss what REPL really is, but... If REPL is the main value proposition, how is it better from average JavaScript development? Dev tools allow you to basically interactively work with your code.

You can keep a JVM running in the background with your project loaded and send stuff there from your IDE/editor.

I don't think this is possible with JavaScript.

Re: Why Clojure?

#187

The 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 kno…

If you like the language, don't let that stop you. Install leiningen and run: `lein new app my-stuff`. Then type `lein repl` and you should have a repl running.

Alternatively, open the project in IntelliJ with Cursive installed or VSCode with Clava or other supported editors and start evaluating code at the repl.

Go through a few tutorials, then go through one of the free books available online. Don't give up when you're stuck.

The language has a steep learning curve because it requires thinking about the program in a different way than many mainstream languages. But it compensates by giving you many 'aha!' moments which make the day :).

Re: Why Clojure?

#188
I 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.

Re: Why Clojure?

#189
post #34

I 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.

Are we reading the same articles ?

I see articles (like the one above) where people are sharing their excellent experience using the language as has been my experience over the years of using it.

A justification would be 'we hate this ugly thing, but we use it because it's cool', but that's not what I've been reading..

Re: Why Clojure?

#190
post #185

Earlier quoted context omitted.

Maybe I miss what REPL really is, but... If REPL is the main value proposition, how is it better from average JavaScript development? Dev tools allow you to basically interactively work with your code.

You can keep a JVM running in the background with your project loaded and send stuff there from your IDE/editor. I don't think this is possible with JavaScript.

You can eval strings in Javascript, so pretty sure that's possible.
Post reply on HN