develooper Front page | perl.perl6.language | Postings from May 2001

Re: Perl, the new generation

Thread Previous | Thread Next
From:
Larry Wall
Date:
May 10, 2001 17:37
Subject:
Re: Perl, the new generation
Message ID:
200105110032.RAA02954@kiev.wall.org
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

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About