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

I understand that but you can have a macro wrapping a goto statement to a predefined label which will do that for you (and potentially set some errors). It's debatable whether this really gives you anything but I kind of like this style since you can replace the whole if statement with a single line something like check_memory(pointer);. The goto's become particularly useful if you want to have some cleanup done at the end of the function even if something during the function fails.


Now your assuming the language has goto. Which definitely is not the case these days.


Well the discussion is about go and go does have gotos. http://golang.org/ref/spec#Goto_statements




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

Search: