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

> Every single caller between the handler and condition site has to be able to handle both the happy path (got a result) and unhappy path (got a condition).

This isn’t terrible, 2 relatively popular languages, Rust and Go, do not have exceptions and do require the caller explicitly handle errors. Rust even has a question mark operator to make error handling this way a bit more ergonomic.

> Another issue is just in performance. In an error or try/catch system you unwind the stack along the way. In a condition system, you don't.

That makes sense. I’m curious if this is something that can be optimized statically by a compiler.



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

Search: