4 ms·
Woah — with all the declarative and functional languages, looks like someone has just discovered a (stateful) state machine. They’re trying to convince us that
by e-dant 4y ago
Woah — with all the declarative and functional languages, looks like someone has just discovered a (stateful) state machine. They’re trying to convince us that this is a useful thing in a hypothetical situation where people do ridiculous, unsafe things on an ad-hoc basis. Not sure I’m buying it.
Oh, wrong universe.
Edit:
I use state, too. I get it. I just dislike it. It doesn’t usually compose and is rarely safe.
- kaba0 4y agoIt is not hard to argue that several FP abstractions are basically state machines themselves, their transition function is simply recursively defined. For a trivial example, objects defining the Applicable trait.
- e-dant 4y agoWhich abstractions? I could see a monad being defined as a list of (typed) states with a functor. But they’re still stateless. I could also see immutable data structures being implemented in a stateful way (they usually are in non-FP languages).
- deleted 4y ago[deleted]