3 ms·
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 de
by adamnemecek 14y ago
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.
- masklinn 14y agoNow your assuming the language has goto. Which definitely is not the case these days.
- adamnemecek 14y agoWell the discussion is about go and go does have gotos. http://golang.org/ref/spec#Goto_statements http://golang.org/ref/spec#Goto_statements