5 ms·
I think you're conflating functional programming with Haskell. You can use something like Clojure without touching monads, just use functional data structures
by moonchrome 11y ago
I think you're conflating functional programming with Haskell.
You can use something like Clojure without touching monads, just use functional data structures to represent values instead of using objects, and the using mutable state is simple just not the default and you rarely need to go there.
In fact if you're using something like React and something like Redux you're going in that direction from the other side - in Clojure it's basically the natural way to solve the problem (and frankly all of their concepts map much better to CLJS than JS)
I feel like people pushing Haskell and all of the weirdness that comes from lazy evaluation did more harm to FP perception in the general programmer community than good.
- rubiquity 11y ago> * feel like people pushing Haskell and all of the weirdness that comes from lazy evaluation did more harm to FP perception in the general programmer community than good* You've hit the nail on the head. Haskell has the combination of being very extreme and popular enough that it is damaging the perception of FP as a whole. I really wish Haskell didn't exist. For anyone skeptical of FP who might be reading this: start with a dynamic FP language or a typed FP language that is strict rather than lazy. Examples of the former are Erlang/Elixir or Scheme. Examples of the latter are OCaml, Elm, F# or good old Standard ML.
- justaaron 11y agobeg your pardon? you said "react cool" and "lazy eval bad" in the same sentence... what's react but lazy eval of the dom?
- moonchrome 11y agoThere's nothing wrong with lazy evaluation, like lazy seq/iterable transforms - it's just not a good "default" IMO