2 ms·
I'm not talking about "faking" exceptions. I'm talking about just not using them. Instead of "catching" exceptions down (up? In my debugger, it's down) the st
by stcredzero 17y ago
I'm not talking about "faking" exceptions. I'm talking about just not using them. Instead of "catching" exceptions down (up? In my debugger, it's down) the stack, you can just detect errors and send something down a channel. If you can conveniently send the current function's pointer, or better yet, the current context, you can do much of what you'd use exceptions for.
- sedachv 17y agoHow do you detect errors? That's the question that the exception-handling part of exceptions is designed to solve. Having every function need a reference to a channel is really no different than error detection using return codes.