Embed Notice
HTML Code
Corresponding Notice
- Embed this notice@kirby @MercurialBuilding @condret @kirby @MercurialBuilding @condret
i imagine K&R added it to their book as they wanted it to be part of the C spec to help the Basic and Cobol developers to find some familiarity.
The issue with goto's primarily that it can interact with stacks in odd ways, and almost any wanted use of a goto could be better defined with a function (with the added benefit of allowing value return)
They can also fuck up alot of compiler optimisation (albeit through lack of use)
Id seriously consider not using goto's unless your code is architected in such a way that you cannot not use them and you don't have the time to refactor your code to be friendlier to stacks