News for hackers. Stuff that matters.
Re:State Monad for the Rest of Us by marcosdumay on Friday August 09, 2024 @12:16PM (#41203199)
Some uses you'll find in Haskell:

- representation of "the real world" where you can send data, control things, etc;

- representation of early return error semantics, like you have with exceptions;

- encapsulation of different execution threads, so you only interface with the group;

- encapsulation of a computer architecture, so something compiled for your GPU runs on the GPU, and something compiled for your CPU run on your CPU;

- encapsulation of transactions, so you can have a multi-threaded software changing whatever shared value you want and none of that leaks to the larger software;

- data structure, like libraries that encode hardware description into them.

That list is not in any way comprehensive. It's just stuff that I can remember right now.

There are no comments on this comment yet.