Re: strictness and fully qualified global vars

2004-12-28 Thread Ashley Winters
On Tue, 28 Dec 2004 22:31:47 -0700, Luke Palmer <[EMAIL PROTECTED]> wrote: > Ashley Winters writes: > > sub foo (Class $who) { > > my $thing := $who<$var>; > > my &func := $who<&func>; # how would I do this otherwise? > > } > > In current Perl 6: > > sub foo (Class $who) { >

Re: strictness and fully qualified global vars

2004-12-28 Thread Luke Palmer
Ashley Winters writes: > sub foo (Class $who) { > my $thing := $who<$var>; > my &func := $who<&func>; # how would I do this otherwise? > } In current Perl 6: sub foo (Class $who) { my $thing := $::($who)::var; my &func := &::($who)::func; } However, I agree that

Re: strictness and fully qualified global vars

2004-12-28 Thread Ashley Winters
On Wed, 29 Dec 2004 06:55:11 +0300, Alexey Trofimenko <[EMAIL PROTECTED]> wrote: > P.S. I have one (almost unrelated to topic) observation: if sigil is a > part of a variable name, then C< Package::$var > makes more sense than > perl5 C< $Package::var >. (AFAIK, PHP5 works this way) And this requir

strictness and fully qualified global vars

2004-12-28 Thread Alexey Trofimenko
in perl5 C doesn't save us from typo bugs in code like use strict; print $OtherPackage::erroneuos_name; in perl5 C auotovivifies ${__PACKAGE__ . "::"}{var} glob at compile time, so there's something one could check with C, but to do it manually is senseless. And there are no globs in perl6.