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

Didn't the programmers' grandfathers warn them that "GOTO is considered harmful"?

To paraphrase Macbeth -

"Is this a GOTO I see before me?

Come, let me hold you.

I don’t have you but I can still see you. Fateful apparition, isn’t it possible to touch you as well as see you?

Or are you nothing more than a GOTO created by the mind, a hallucination from my fevered brain?

I can still see you, and you look as real as this other GOTO that I’m pulling out now ..."



Why does it matter? The GOTO wasn't the problem, and GOTO is a reasonable solution to doing cleanup in C.

The problem is the code forgot to check for a particular situation: https://marc.info/?l=linux-nfs&m=153807208928650&w=2


In my case it was my strict grandmother. Everytime she found GOTO in my code, she spanked my hands with a stick.




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

Search: