logoalt Hacker News

tomeyesterday at 7:52 PM1 replyview on HN

Right, I understand the history (although I'm not sure I'd say that exception don't compose well) and I understand that "algebraic effects" are an attempt at something better. But I don't understand whether they're something that can be precisely defined or just informal terminology for "a better sort thing for dealing with effects".


Replies

noelwelshyesterday at 8:31 PM

You can precisely define any particular model, but not all work in the area shares the same model. I think you know about the capability-passing model, which is quite different to the algebraic effects (e.g. row types) models.

The general ideas are:

* effects are handled by handlers (called capabilities in the capability-passing model)

* function signatures describe the effects that are used

* effectful code is written in direct style, not monadic style