On Tue, May 13, 2003 at 04:25:03PM +0200, Per Hedbor () @ Pike (-) developers forum wrote:
while() works just as well for that, though. Or a jump-table (function pointers in an array or mapping or similar)
In theory, it is possible to use Turing machine to do anything you want, so why do we need anything more? :)
As I said, gotos are bit more readable and obvious. For instance:
reset: [some-setup-code] while(1) { [some processing code] if (condition) goto reset; [some processing code] } [some more code]
This fragment may be rewritten not to use goto, but it is more obvious to use it, especially where "setup-code" is huge enough and may not be separated to another function.
2Martin Baer: There is nothing evil in gotos (and those who say that goto is evil should not use computers at all - machine code uses jmps etc :)
Regards, /Al