News for hackers. Stuff that matters.
Re:Try Clojure by bunderbunder on Wednesday May 22, 2024 @03:05PM (#40444863)
A somewhat similar thing I ran into is that existing Clojure code can be incredibly difficult to grok if you don't already know the language very well.

Some of this comes from lisp's minimalist syntax, which makes it hard to even know what kind of thing you're looking at when you're encountering a new thing for the first time. But the problem is also compounded by some of Clojure's more distinctive (and powerful) features such as ad-hoc polymorphism and using maps to pass function arguments.

The closest analogy from imperative languages that I can think of is another language that's famous for being incredibly productive in the hands of a skilled user, but whose code tends to feel kind of write-only: Perl.

Re:Try Clojure by kazinator on Wednesday May 22, 2024 @03:27PM (#40445187)
In Perl you have the dynamism, and the syntax.

Evidently, 93% paint splatters, when OCRed, are valid Perl programs:

https://www.mcmillen.dev/sigbovik/2019.pdf

I doubt that a similar thing is true for Clojure.

Here, the only problem is that you don't know what the symbols and some of the notations mean. You can look at the unfamiliar syntax and know what is a child of what. Most operators are words you can search for.

Re:Try Clojure by slifin on Wednesday May 22, 2024 @05:45PM (#40447034)
If I can get clojure storm running in my project then I find a lot of code incredibly straightforward

Because there's a preference for just passing immutable data around the time travel debugger really helps me understand complex interactions