4 ms·
Property 2 implies immutable state. I also used to think that was a great idea. Then I tried actually programming that way.
by togaen 4y ago
Property 2 implies immutable state. I also used to think that was a great idea. Then I tried actually programming that way.
- AlchemistCamp 4y agoI’ve done most my programming in the past several years in Elixir, where mutable variables aren’t an option, and it’s been a great dev experience. An entire class of bugs disappears and it makes concurrency very easy to reason about.
- macintux 4y agoAfter spending a few years in Erlang, it's hard (and depressing) to go back to any other way of programming.
- dkersten 4y agoI’ve written a lot of Clojure and Clojurescript over the past ~12 years and I find it a very natural way to program to the point that it’s the single biggest thing I miss when I work in other languages like javascript and Python.
- aappleby 4y agoAuthor here. State is not immutable, it is mutate-in-place via atomic swap. That makes it somewhat different than both functional programming and imperative programming, but it's not an excessively difficult programming style to use in practice.