On Tue, Oct 25, 2005 at 05:26:32PM +0200, Juerd wrote:
: Michele Dondi skribis 2005-10-25 17:17 (+0200):
: > Hmmm... maybe you're right that $__ is too huffmanized (and hence
: > confusing) but $OUTER::_ is somewhat too few...
:
: for (1..9) -> $n { # ought to be more than enough
: e
On Tue, 25 Oct 2005, Juerd wrote:
for (1..9) -> $n { # ought to be more than enough
eval qq[
macro prefix:<\$_$n> { "\${ "OUTER::" x $n }_" }
];
}
And then you can use $_1 .. $_9. I think $_1 is much clearer than $__,
but I think neither is needed in the standard
Michele Dondi skribis 2005-10-25 17:17 (+0200):
> Hmmm... maybe you're right that $__ is too huffmanized (and hence
> confusing) but $OUTER::_ is somewhat too few...
for (1..9) -> $n { # ought to be more than enough
eval qq[
macro prefix:<\$_$n> { "\${ "OUTER::" x $n }_"
On 2005-10-25 11:17 AM, "Michele Dondi" <[EMAIL PROTECTED]> wrote:
>> I find $__ confusing, and prefer $OUTER::_, which already exists.
>
> Hmmm... maybe you're right that $__ is too huffmanized (and hence
> confusing) but $OUTER::_ is somewhat too few...
What's confusing about $__ is that it lo
On Tue, 25 Oct 2005, Juerd wrote:
Michele Dondi skribis 2005-10-25 17:05 (+0200):
Now, one that I've sometimes desired is a "two level" $_, i.e. a variable,
say, $__ referring to the _second next_ enclosing lexical scope. I am
aware that in this vein one may ask a third analogue and so on, but
Michele Dondi skribis 2005-10-25 17:05 (+0200):
> Now, one that I've sometimes desired is a "two level" $_, i.e. a variable,
> say, $__ referring to the _second next_ enclosing lexical scope. I am
> aware that in this vein one may ask a third analogue and so on, but let's
> face it: $_ already c
On Tue, 25 Oct 2005, Juerd wrote:
Reducing line noise isn't my goal, though. I feel that the implicit
defaulting to $_ makes Perl a more natural and elegant language, and
would like this principle being extended to these operators.
Indeed, both the implicit defaulting to $_ AND the availabilit