Hacker News new | ask | show | jobs
by pickdenis 2372 days ago
Since JS lacks a static type system, isn't it a bit misleading to call these "algebraic" effects, when algebraic is referring to the type system? I'm still not clear where the "algebraic" part comes in here.
2 comments

Algebra lacks a static type system, too. If among the numbers we recognize types such as "integer", "rational", "real", "complex", we need dynamic typing, because the value of any polynomial fraction P(z)/Q(z) for any given z can be any of these types, depending nontrivially on the value of z and all the coefficients.
Maybe the name "algebraic effect" isn't good enough... What name you think that could fit better?
I think this is just a (limited) version of Lisp’s conditions and restarts (https://wiki.c2.com/?CommonLispConditionSystem, https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule).

So, I would call these conditions and restarts.