3 ms·
Idris Effects are a lot better
by topmonk 7y ago
Idris Effects are a lot better
- onemoresoop 7y agoWould you care to give more details?
- topmonk 7y agoEffects can keep track of resources, such as open files, not allow writing to a file that was open for reading, and force the caller to acknowledge error conditions. It also doesn't have the issue with monad transformers and having to lift all over the place. Nor out-of-order transformers, such as StateT Reader vs ReaderT State. You can also label effects, so you could have the equivalent of StateT Foo StateT Bar ... without having to remember which one to lift. You just simply refer to the state you want by its label. It also introduces people to dependent types and shows some amazing concepts in a practical example. Not that monads are bad, but once you got the concept down about a glob of data and lambda functions representing code you can run, Effects open you up to a whole new world.
- onemoresoop 7y agoThanks a lot! I will take a look at Irdis Effects. It sounds very interesting.