Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Like goto, but you don't even need to name a label.

That's what exceptions are.

But effects don't cause you to see huge stack traces in errors because the whole point is that you provide the effect and values expected and the code goes on running.




>> Like goto, but you don't even need to name a label.

> That's what exceptions are.

In many contexts I agree. However, the difference here is exceptions are one-way execution control transfers.

Remember what was originally said:

  No amount of monad shenanigans is going to allow you to 
  immediately jump to an effect handler 5 levels up the call 
  stack, update some local variables in that stack frame, and 
  then jump back to execution at the same point 5 levels down.
Jumping "5 levels up the call stack", modifying some state, then jumping back "5 levels down" is to me pretty much the definition of a nightmare to reason about.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: