|
|
|
|
|
by Corazoor
1279 days ago
|
|
One big difference: GOTO ist not bound to any scope. Which ist no wonder, its usually just syntactic sugar for an omnipresent assembly instruction: JMP. Algebraic effects are less general and play nicer with scoped constructs like finalizers and exceptions. The downside is that they work via stack unwindindig, so they incur some performace penalties. I highly recommend reading the original article - "Algebraic Effects for the Rest of Us". It demonstrates their operation via Javascript by renaming try/catch, and I think it will answer your questions nicely. |
|
That said, the article didn't make me much wiser on what's the point. I could sort of see it if it came with guarantees in the type system, I guess.