DEV Community

Discussion on: Why Functional Programmers Avoid Exceptions

Collapse
 
iquardt profile image
Iven Marquardt • Edited

If an exception would include a mechanism to resume the function at the same position it was originally raised in, then such exceptions were considered pure. This is actually the way algebraic effects work, though I am not an expert on this topic.

Collapse
 
jesterxl profile image
Jesse Warden

Me neither. I know React does something similar to Eff/Koka where they throw Promises. Bizarre stuff using the stack to unwind for control logic.