7 ms·
Well, Haskell's IO is "a specific instance of monads", but it was still an important discovery, even though monads were a well known concept. The idea would be
by simiones 7y ago
Well, Haskell's IO is "a specific instance of monads", but it was still an important discovery, even though monads were a well known concept.
The idea would be to encapsulate your whole program in a very specific monad, one that:
- runs all functions in parallel
- implements sync points between functions
- implements an event system with named events and attached values
This does not at all reduce to "reinventing monads".
Note: I think the idea is horrible, any moderately complex program written this way would be entirely unmaintainable in my opinion. The author touches on this towards the end, but I think they are completely minimizing the down-side.
- clarry 7y ago> Note: I think the idea is horrible, any moderately complex program written this way would be entirely unmaintainable in my opinion. The author touches on this towards the end, but I think they are completely minimizing the down-side. I agree so much. I can't help but think that modifying code you don't understand by injecting more code via hooks is a recipe for disaster, and the next person maintaining the composite product has to chase down all (ab)users of these events like we once had to hunt down abusers of global variables to understand what the hell is going on. I don't even agree with the premise that this thing is less dependent on structure. Arguably, it is more dependent. It's just that instead of structure at the syntax level, we're now dealing with structure at a higher level, structure that is opaque to syntax but nevertheless present. Those named events and synchronization mechanisms make up their own structure.