Difference between revisions of "Talk:292: goto"

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
(Created page with "Note that the concept of ''goto being harmful'' fortunately is weaning a little. Jumping forwards in code to the end where error handling is implemented is actually in wider ...")
 
Line 1: Line 1:
 
Note that the concept of ''goto being harmful'' fortunately is weaning a little.  
 
Note that the concept of ''goto being harmful'' fortunately is weaning a little.  
 
Jumping forwards in code to the end where error handling is implemented is actually in wider use now; including many locations in the Linux kernel. [[User:Kaa-ching|Kaa-ching]] ([[User talk:Kaa-ching|talk]]) 09:53, 9 September 2012 (UTC)
 
Jumping forwards in code to the end where error handling is implemented is actually in wider use now; including many locations in the Linux kernel. [[User:Kaa-ching|Kaa-ching]] ([[User talk:Kaa-ching|talk]]) 09:53, 9 September 2012 (UTC)
 +
:Actually, ''goto'' has been used quite with some frequency in low-level code in C programming over the years, so it's not altogether surprising that it is used in the Linux kernel, or any other tight bit of code.  Given the "advance" of programming languages, I wouldn't say that there's been any weaning, except off of the concept of an unstructured goto in more recent languages.  Admittedly, there's a schism between the low-level (that is, near-to-assembly) coders who more readily use ''goto'' because in the end, that's what the compiler reduces code branching down to, and developers using higher-level languages (that is, more highly abstracted, more removed from ''1 statement ~ 1 machine instruction'' languages) avoiding such because alternative structures abound, making ''goto'' somewhat unnecessary.  There has been a bit of a dogmatic approach to teaching various languages, as in "thou shalt not use ''goto'' lest thou produce monsterous, unmaintainable code!" applied that many if not most developers observe; the humor in the panel is that this dogma is manifested in the appearance of a literal monster (a velociraptor, no less...) -- [[User:IronyChef|IronyChef]] ([[User talk:IronyChef|talk]]) 05:08, 11 September 2012 (UTC)

Revision as of 05:08, 11 September 2012

Note that the concept of goto being harmful fortunately is weaning a little. Jumping forwards in code to the end where error handling is implemented is actually in wider use now; including many locations in the Linux kernel. Kaa-ching (talk) 09:53, 9 September 2012 (UTC)

Actually, goto has been used quite with some frequency in low-level code in C programming over the years, so it's not altogether surprising that it is used in the Linux kernel, or any other tight bit of code. Given the "advance" of programming languages, I wouldn't say that there's been any weaning, except off of the concept of an unstructured goto in more recent languages. Admittedly, there's a schism between the low-level (that is, near-to-assembly) coders who more readily use goto because in the end, that's what the compiler reduces code branching down to, and developers using higher-level languages (that is, more highly abstracted, more removed from 1 statement ~ 1 machine instruction languages) avoiding such because alternative structures abound, making goto somewhat unnecessary. There has been a bit of a dogmatic approach to teaching various languages, as in "thou shalt not use goto lest thou produce monsterous, unmaintainable code!" applied that many if not most developers observe; the humor in the panel is that this dogma is manifested in the appearance of a literal monster (a velociraptor, no less...) -- IronyChef (talk) 05:08, 11 September 2012 (UTC)