Re: RFC 88: Possible problem with shared lexical scope.
[email protected] (Peter Scott) Tue, 22 Aug 2000 19:49:34 -0700
| Newsgroups | perl.perl6.language.errors |
|---|---|
| Message-ID | <[email protected]> |
At 12:28 PM 8/22/00 -0700, I wrote:
The issue is not whether it is possible but whether it is desirable. Chaim
thought that the P5 continue block scope issue was 'fixed' by Gurusamy at
some point and this is almost certainly correct. Observe:
>% perl5.003 -Mstrict -we 'my $x = 2; while($x--) { my $y = $x } continue {
>print "y = $y\n" }'
>y = 1
>y = 0
>% perl5.00503 -Mstrict -we 'my $x = 2; while($x--) { my $y = $x } continue
>{ print "y = $y\n" }'
>Global symbol "$y" requires explicit package name at -e line 1.
>Execution of -e aborted due to compilation errors.
>
>So the first perl had a shared scope, but it was removed by the second
>one. Clearly the shared scope is doable, but it was considered a
>misfeature. I will attempt to find out why.
The initial p5p estimate is that the shared scope elimination was a side
effect of another change. No-one has suggested that it is a bad thing per se.
--
Peter Scott
Pacific Systems Design Technologies