Luke Palmer skribis 2005-10-07 15:31 (-0600):
> Well, I see a cognitive downside. That is, package declarations (the
> default) don't create closures. It's like this:
> sub foo($x) {
> sub bar() {
> return $x;
> }
> return &bar;
> }
> foo(42).(); # ????
Does this mean that this Perl 5 snippet no longer does the same in Perl 6?
{
my $foo = 5;
sub bar {
return $foo;
}
}
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html