logoalt Hacker News

brabeltoday at 9:47 AM1 replyview on HN

The CL condition system always gets brought up when people unfamiliar with effects see effects for the first time (example: https://news.ycombinator.com/item?id=38813484, another example: https://lobste.rs/s/12m2f0/algebraic_effects_another_mistake).

But while the condition system can do many things you can also do with effects, they cannot do everything.

Here's another discussion on this: https://news.ycombinator.com/item?id=44078743


Replies

u1hcw9nxtoday at 10:10 AM

CL conditions do what you actually need if you program. CL gives you deterministic state, safe resource management etc.

Nondeterminism is not a feature you want. Algebraic effects treat the execution stack (continuation) as data, you have total freedom over what you do with it. This flexibility is exactly where you get nondeterminism. This is how logic solvers or probabilistic algorithms work, but you don't want it as a programming language feature in general purpose programming language.

show 2 replies