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

> If you have a complicated function, and several exit points where you want to bail out, they why not just put a "label: bail" and goto it?

Because go-to is so infrequently a good choice and do frequently used when wrong that most languages don't have it at all, so it's not an option. It may be a reasonable. choice when available, especially if you aren't breaking structure and thereby making it harder to follow the logic.



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

Search: