2 ms·
I have done functional programming (FP) with Haskell (including professionally) for years, and I think this notion is misguided. One of the core principles of
by gregwebs 11y ago
I have done functional programming (FP) with Haskell (including professionally) for years, and I think this notion is misguided.
One of the core principles of FP is about state. However, I believe it is to think very carefully about state and be very explicit about how you handle it rather than performing ad-hoc mutations. That often means avoiding state, but many problems require maintaining state.
State machines can be a great tool to be explicit about state management to the point that you can have a specification for how state behaves.
- lectrick 11y agoThanks for the clarification. Also, constraint of side effects at the language level allows powerful things like... time-traveling debuggers (does GHC provide anything like this, btw? Because it probably could...) http://elm-lang.org/blog/time-travel-made-easy http://elm-lang.org/blog/time-travel-made-easy