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

What's up with %MY?

Thread Next
From:
Ken Fox
Date:
September 3, 2001 21:07
Subject:
What's up with %MY?
Message ID:
3B94558C.B388A000@vulpes.com
I haven't seen details in an Apocalypse, but Damian's
Perl 6 overview has a bit about it. The Apocalypse
specifically mentions *compile-time* scope management,
but Damian is, uh, Damian. (DWIMery obviously. ;)

Is stuff like:

  %MY::{'$lexical_var'} = \$other_var;

supposed to be a compile-time or run-time feature?

Modifying the caller's environment:

  $lexscope = caller().{MY};
  $lexscope{'&die'} = &die_hard;

is especially annoying because it means that I can't
trust lexical variables anymore. The one good thing
about Damian's caller() example is that it appears
in an import() function. That implies compile-time,
but isn't as clear as Larry's Apocalypse.

This feature has significant impact on all parts of
the implementation, so it would be nice if a little
more was known. A basic question: how much performance
is this feature worth?

- Ken

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