Live data from Hacker News

Why Clojure?

gaiwan.co

11–20 of 302 posts

Re: Why Clojure?

#11

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

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

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

Re: Why Clojure?

#12

Earlier quoted context omitted.

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

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

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

Re: Why Clojure?

#13

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

I feel like there’s a minimum developer quality that’s needed when using a language like Clojure, without static typing, and with a wealth of idioms and best practices that need to be followed and libraries that need to be known.

Without it it’s a matter of time before the codebase can’t be developed anymore and the software doesn’t work as intended.

Re: Why Clojure?

#14
Learning 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.

Re: Why Clojure?

#15

Earlier quoted context omitted.

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

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

The condition framework/break loop is one thing I wish more Lisps would copy.

Re: Why Clojure?

#16
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?

Re: Why Clojure?

#17
Tried 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

Re: Why Clojure?

#18
post #5
post #3

Because you want the type safety of lisp with the simplicity of the jvm /s

You 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 whe…

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

Re: Why Clojure?

#19
post #13

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

I feel like there’s a minimum developer quality that’s needed when using a language like Clojure, without static typing, and with a wealth of idioms and best practices that need to be followed and libraries that need to be known. Without it it’s a matter of time before the codebase can’t be developed anymore and the software doesn’t work as intended.

Yes and actually this happens often that a project is moved to another language because of maintainability, especially when a key person leaves the company.

Re: Why Clojure?

#20
post #6

I 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

The repl isn't slow, what are you referring to?
Post reply on HN