Edward Peschko writes:
: Although I would amend what he said to saying 'perl6 will eat perl 5 code
: close to painlessly as possible including typeglobs'. Typeglobs are a central
: part of a lot of CPAN's core modules; I don't think we could get away with 
: abolishing them willy-nilly.

Much of typeglob's functionality can be emulated, since Perl 6's symbol
tables will have equivalent or better introspection, though only on a
variable by variable basis.  Certainly the simple aliasing won't be a
problem.  Localizing typeglobs can also pretty easily be done if a
single subtype is involved, since Perl 6 symbols will contain single
types.  Passing typeglobs around is more problematic, but that can
probably be emulated by passing the string name around and dereffing it
upon use.  More problematic will be localizing a typeglob without
assigning anything to it.  So local(*foo) would probably have to be
emulated with:

    temp $foo;
    temp @foo;
    temp %foo;
    temp &foo;

or some such, unless the purpose of the local(*foo) could be determined
by unscrupulous means.  Similarly, glob aliases *foo = *bar would
need special treatment.

Larry

Reply via email to