On Thu, Sep 16, 2004 at 10:02:18AM -0600, Luke Palmer wrote:
: The new alternative is MY.sub. I suppose that could return the current
: actual sub, so if you're using a pointy sub you have to say MY.block or
: something. But it's one of those two.
Or something resembling them. I'm still pining for sigils on MY values.
Plus the method notation is problematic: people will wonder why
sub ($x) {
MY.sub($x - 1);
}
doesn't work, not realizing that they'd have to say
MY.sub()($x - 1);
So we're probably going to end up with another secondary sigil, since
it's a weird magical metanamespace. I was going to combine with the
$=DATA magical pod stream namespace, but there's a subtle difference
between a file-scoped metavariable that is the same everywhere in
the file and a lexically scoped metavariable that varies everywhere
in the file. So we probably need a different "ssigil". Here are the
candidates, leaving out brackets and already-used ssigils. (And Unicode).
$`line
$~line
[EMAIL PROTECTED]
$#line
$&line
$-line
$+line
$\line
$|line
$;line
$'line
$"line
$,line
$?line
$/line
I like $-, $+, and $? the best. Probably should save $- and $+ for something
complimentary, which leaves $?. It's visually distinctive, and recently
came available. :-)
So maybe $?sub is the name of the current sub, while &?sub is a reference
to the current sub. Maybe $?block is the label on the current block, while
&?block is a ref to the closure?
Larry