On 20 September 2014 15:43:46 GMT+01:00, Leigh <[email protected]> wrote:
>On 20 September 2014 01:02, Rowan Collins <[email protected]>
>wrote:
>>
>> It seems like there are actually quite a number of special blocks you
>> *could* define
>
>Some or all of these can be implemented (in other RFCs).
>
>However in order to avoid specifying every permutation in the grammar
>it would require converting loop structures that currently have a
>defined number of children, into list structures ("if" behaves like
>this, with multiple optional "elseifs" and an optional "else").
Yeah, I absolutely didn't mean that all of these were equally essential, I was
just brainstorming some of the possible permutations.
I guess the only way to avoid running out of keywords would be to have a
generic clause like "on(x)", but that's probably just asking for trouble...
foreach ( $x as $y ) {
...
} on ( break ) {
...
} on ( nobreak ) {
...
} on ( continue ) {
...
} on ( nocontinue ) {
...
} on ( noloop ) {
...
} on ( loopcount == 1 ) {
...
}
Yeah, let's not do that! :p
--
Rowan Collins
[IMSoP]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php