>>>>> "BL" == Bart Lateur <[EMAIL PROTECTED]> writes:
BL> On Fri, 13 Jul 2001 20:55:07 +1000 (EST), Damian Conway wrote:
>> Would you like to clarify what you mean here.
>> Are you talking about typeglob assignments?
>> Perl 6 will have:
>>
>> $Foo::{'$bar'} = \$baz; # Alias $Foo::bar to $baz
BL> Are we back to "globals only"? What about lexical aliases? Something
BL> like:
BL> my \%foo = \%bar;
BL> (Now %foo is an alias to %bar.)
what damian has been showing as a possible/probably solution is a
lexical scoped symbol table called %MY::. it would be available inside
any block scope and allow you to alias things just like the above:
$MY::{'$bar'} = \$baz; # Alias lexical $bar to $baz
now $bar is lexical and aliased to $baz
i like the concept but i worry about the overhead of setting up %MY. i
assume it will only be created if it is referred to in the block. there
may be other optimizations.
one related point is that this symbol table will be accessible via
caller() so you could access/install lexical symbols in a parent block
on the call stack. scary!
uri
--
Uri Guttman --------- [EMAIL PROTECTED] ---------- http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Learn Advanced Object Oriented Perl from Damian Conway - Boston, July 10-11
Class and Registration info: http://www.sysarch.com/perl/OOP_class.html