> while($x)
> {
>         $y += foo($x);
>         $x = bar($x);
>         $big_global_variable = analyze($y,$x);
> }
> 
> This leaves you with three variables that may or may not be dependent
> on the upper scope for resolution by default.

As the RFC is written, only *anonymous* blocks are auto-scoped, because
as you note dividing things up based on if/while/etc seldom makes sense.

As Graham wrote, this is of debateable usefulness. It's good if you like
to write blocks inline to partition code off, but many people don't do
this. "use scope 'blocks'" may get the axe if there's a v2.

-Nate

Reply via email to