Re:Bug #48669: PHP now includes GOTO
by shaunxcode on Friday August 21, 2009 @05:12PM
(#778475)
On the flipside it certainly makes implementing TCO a lot more possible for those of us generating php.
So, to summarize, it's useful for people building certain projects with PHP and at the same time a great boon for people making sarcastic comments about PHP. Win win.
10 Yes,
20 COMEFROM 50
30 but when will they include comefrom.
40 COMEFROM 10
50 I always wanted goto,
60 COMEFROM 30
a comefrom would indeed be interesting and arguably more useful...
Ouch. My first negative.
Comefrom could be usefull to implement aspect oriented semantics.
Invisible asserts are also possible for debugging purposes, that don't pollute the codebase. They also don't self-document the code but (and I might be mistaken) PHP can't just optimize some statements out so as to not have them eat cycles like compiled langs.
Both of these could sit in separate modules and be coupled in or not depending on weather one debugs or deploys.
I wonder why this took so long. To this date the oversight of omitting goto from a language that otherwise seemed so geared towards obfuscation puzzled me greatly.