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

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.



I 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.)




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: