3 ms·
it's tricky because the kind of situations where goto is helpful are usually frowned upon, but sometimes they are unavoidable. like large nested state machines
by inconceivable 3y ago
it's tricky because the kind of situations where goto is helpful are usually frowned upon, but sometimes they are unavoidable. like large nested state machines that you need to jump around in or skip parts of. this was more common with C.
when used properly it should be really obvious what it's doing, where it's going, and shouldn't produce any weird side effects. jumping into another function or module or file isn't good.