News for hackers. Stuff that matters.
Re:Clerk: Local-First Notebooks for Clojure by grzm on Sunday November 07, 2021 @06:51PM (#29144757)
An aspect of immutability I really appreciate is that I know no variable has been changed after it's been assigned to, including by me. If I want to know where the value was assigned, I only have to look for the only place it could have been assigned. I don't have to search anywhere else.
Re:Clerk: Local-First Notebooks for Clojure by romero-jk on Sunday November 07, 2021 @09:10PM (#29145539)
99% of variables are local to your function, is not like program a thousand of global variables.
Re:Clerk: Local-First Notebooks for Clojure by grzm on Sunday November 07, 2021 @09:26PM (#29145627)
Sounds like you code pretty tight. I've seen plenty of functions reference variables out of function scope, or be reassigned within long function bodies. I personally don't code that way, but not everyone does. And as you've seen in this thread, there are people that do like immutability. To each his own.
Re:Clerk: Local-First Notebooks for Clojure by romero-jk on Sunday November 07, 2021 @09:48PM (#29145736)
I do prefer immutability too and think it should be the default for most programming, my original point was that for me, the trade-off of using clojure (small ecosystem) instead javascript for single server CRUD apps is not worth it but as a language I'll take clojure over javascript any day.