Hi luis,luis wrote:That would be really a ridiculous thing.They should be avoided and maybe should use compiler warnings to make this clear.
I agree.
The problem is not Goto itself, the problem is that Goto is very often abused, producing unreadable spaghetti code.
It's like using a sharp scalpel: an experienced surgeon knows when and how to use it properly. But when untrained people use it all the time anywhere and anyhow, nothing good comes out of it.
Unfortunately, too many people cannot resist this invitation ...[u]Dijkstra[/u] wrote:The go to statement as it stands [...] is too much an invitation to make a mess of one's program.
At least the documentation of Goto should cointain in bold letters: For advanced programmers only.