Re: Remember: Outlaw to declare a lexical twice in the same scope

2007-01-27 Thread Carl Mäsak
Steve Lukas (): Hi @larry, I want to remember to my proposal from september 2006. It targets on changing S04. The discussion is summarized on: http://www.oreillynet.com/onlamp/blog/2006/09/weekly_perl_6_mailing_list_sum_3.html So, please change S04 as discussed. I, too, would like to point to

Re: Remember: Outlaw to declare a lexical twice in the same scope

2007-01-27 Thread Dave Mitchell
On Sat, Jan 27, 2007 at 10:23:03AM +0100, Carl Mäsak wrote: my $foo; # ...later in the same scope... my $foo; # illegal Perl5, legal Perl6 No, that's perfectly legal in perl5; it just generates a warning: use warnings; my $x = 1; my $f1 = sub { $x }; my $x = 2; my $f2 =

Re: Remember: Outlaw to declare a lexical twice in the same scope

2007-01-27 Thread Carl Mäsak
Dave (), Carl (): my $foo; # ...later in the same scope... my $foo; # illegal Perl5, legal Perl6 No, that's perfectly legal in perl5; it just generates a warning: use warnings; my $x = 1; my $f1 = sub { $x }; my $x = 2; my $f2 = sub { $x }; printf f1=%d f2=%d

Re: Remember: Outlaw to declare a lexical twice in the same scope

2007-01-27 Thread Smylers
Carl Mäsak writes: my $foo; # ...later in the same scope... my $foo; # illegal Perl5, legal Perl6 That isn't illegal in Perl 5. It yields the warning: my variable $foo masks earlier declaration in same scope but it does work. Smylers