3 ms·
If we're talking the original goto, jump to arbitrary address unrelated to current function, then we're talking whole program transformation to remove it. Even
by JonChesterfield 5y ago
If we're talking the original goto, jump to arbitrary address unrelated to current function, then we're talking whole program transformation to remove it.
Even with the local limited version, I think removing it requires proliferation of Boolean flags, so it's not performance-equivalent unless your compiler manages to undo the refactor back to the goto form.
- zzo38computer 5y agoI did mean the local limited version, but it depends on the programming language (for example, some have a break command and continue command, etc). However, it is a good point that it is not necessarily performance-equivalent. I think that (for this reason and for other reasons too), that most general purpose programming languages (and many ones with special purposes, too) should have a goto command. (Although, there are also some kind of programming languages for which I would think that having a goto command would be inappropriate, such as Verilog and Haskell.)