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

"But goto is considered harmful"

GOTO _was_ considered harmful back in 1968(!) when structured programming was still in its infancy. Code of that time was usually peppered with GOTOs and therefore a pain to read.

Using GOTO for cleanup tasks is perfectly fine because it increases readability.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: