As for my own example, many state machines make extensive use of goto to avoid recursive calls.
Goto is not required for that. State machines such as the
following
state1:
...
goto state99;
state99:
...
goto state2;
done:
can easily be rewritten as
while (!end_condition) {
switch (state) {
case 1:
state = 99;
break;
case 99:
state = 2;
break;
}
}
- Sascha
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
