Re: PROTOPROPOSAL FOR NEW BACKSLASH was Re: implied pascal-like"with" or "express"
[email protected] (Nathan Torkington)
| Newsgroups | perl.perl6.language.objects |
|---|---|
| Message-ID | <[email protected]> |
David L. Nicol writes:
> okay but we still have the hiding issue, in case we want it to
What's the hiding issue? I must have missed that.
> $one{two} is $one\two
> $$one{two}{three} is $one\two\three
> $$$one{two}{three}{four} is $one\two\three\four
Your left hand side is, I think:
$one->{two}{three}{four}
in a very complicated fashion. I'm unsure this is what you meant.
> with %one\two {
> push @\three\four, 5,6;
> }
> is clear and invulnerable.
Except that you often don't know the keys in advance, and so now
your code turns into:
with %one\$keytwo {
push @\$keythree\$keyfour, 5, 6;
}
which is decided sub-clear. The precedent of "if you're doing a hash
lookup, use {} around the key" is fairly well-ingrained in Perl.
Nat