News for hackers. Stuff that matters.
Re:Tour of our 250k line Clojure codebase by dustingetz on Thursday June 03, 2021 @03:59PM (#27386518)
Clojure's value prop is:

1) default immutability (same simple data structures used in every library -> ecosystem composes better)

2) portable code across multiple host platforms (jvm, node, browser)

3) metaprogramming

IMO, in 2007, immutability on the JVM was a competitive value prop, but in 2021+ it is nothing special. It is the combination of the three things which is a competitive value prop today. Metaprogramming in particular is a mostly unexplored frontier, because it is very hard to do well, and very easy to do badly. Default immutability is kind of a necessary starting point to do metaprogramming well.

Re:Tour of our 250k line Clojure codebase by davidrupp on Thursday June 03, 2021 @04:45PM (#27387050)
> in 2007, immutability on the JVM was a competitive value prop, but in 2021+ it is nothing special

Can you elaborate on this? What do you think has changed in that time to make it "nothing special"?

Re:Tour of our 250k line Clojure codebase by dustingetz on Thursday June 03, 2021 @05:05PM (#27387308)
immutability as a library is available in basically all mainstream languages now and mainstream frameworks leverage it (react, any UI framework, spark, any data framework or database); JS vms are competitive with the JVM and the JVM might even be losing ground in the cloud; typescript is a monster and is letting people explore haskell concepts in industry applications; scala is way better in 2021 than it was in 2011; every new PL can compile to JS and supports immutability. Clojure's sweet spot is currently developing sub-languages embedded in Clojure like RPL is doing (we are doing exactly the same thing at hyperfiddle). That is still too hard to do in typescript imo. Maybe it is possible in scala 3 but it took them 10 years of pure autism to figure out how to do monadic IO in scala due to how complex scala is, so i'd expect it to take another 10 years to figure out how to do metaprogramming in a commercially viable way, I'd be happy to be proven wrong.
Re:Tour of our 250k line Clojure codebase by davidrupp on Thursday June 03, 2021 @05:10PM (#27387361)
"10 years of pure autism" -- This made me smile.
Re:Tour of our 250k line Clojure codebase by cutler on Friday June 04, 2021 @08:03AM (#27392753)
As far as the JVM goes only Clojure and Scala have real immutability built-in, ie. persistent data structures. Kotlin's default immutability is more like read-only.
Re:Tour of our 250k line Clojure codebase by bcrosby95 on Thursday June 03, 2021 @11:30PM (#27390255)
I think Clojure is still a great choice when your concurrent solution to a problem is amenable to working with stale data. If it is then the correctness of your design will rely heavily upon immutability, and the bugs that can be introduced by not using an immutable-first language like Clojure just isn't worth the risk.