3 ms·
Goto is also very useful for machine-generated state machines, like Ragel or yacc parsers. I'd guess this is the only reason Go has goto, because it has "defer"
by oofabz 13y ago
Goto is also very useful for machine-generated state machines, like Ragel or yacc parsers. I'd guess this is the only reason Go has goto, because it has "defer" for cleanup, which is functionally equivalent to "finally".