Hacker News new | past | comments | ask | show | jobs | submit login

> If you added multiple returns to every function and manually propagated every error you'd get exactly the same thing as try/catch.

You'd get the same control flow, but it would be visible in your code instead of invisible/magic.

> It's existence comes from not wanting to do all this pointless boilerplate and instead having the compiler do it for you.

Right, but making it be completely invisible goes too far - it's the same problem as AOP.

Either gives you the best of both worlds - minimal boilerplate, but you can still see what's going on.




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

Search: