Live data from Hacker News

Why Clojure?

gaiwan.co

31–40 of 302 posts

Re: Why Clojure?

#31

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

Re: Why Clojure?

#32

Earlier quoted context omitted.

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

While 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. Tryin…

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

Re: Why Clojure?

#33
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

Usually there is also an error message together with a stack trace. I like stack traces: they are usually more informative than just an error message. I had lost too much time debugging Haskell exceptions where they by default do not come with any stack traces.

The only thing that really sucked is just the documentation. They are overly concise. You end up relying on non-official sources of documentation.

Re: Why Clojure?

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

Re: Why Clojure?

#35

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…

[deleted]

Re: Why Clojure?

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

Re: Why Clojure?

#37
Using 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

Re: Why Clojure?

#38

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…

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

Re: Why Clojure?

#39
Why 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.

Re: Why Clojure?

#40
post #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

Macros being supported via quoted arguments is clever
Post reply on HN