On Tue, 16 Jul 2002, Deborah Ariel Pickett wrote:
> > I still have my vote on %() as a hash constructor in addition to {}. :)
>
> The problem I see with that is that % as a prefix implies a
> *dereferencing*, though years of Perl5 conditioning like this:
> %{ $mumble } = return_a_hash();
> print_hash( %{ $mumble } );
>
> (Yes, the braces are optional; I'm assuming that they'll still be needed
> in Perl6, when $mumble is something complex.)
>
> Using %(...) to create a hashref, as { ... } does in Perl5, would go
> against all that, because the purpose of making a hashref is to
> *reference* something. Now a unary % operator/sigil/prefix might mean
> referencing, or it might mean dereferencing, depending on whether the
> symbols following are (...) or {...}. Ouch.
As with $(), I assume %() would force hash context. Nothing more. You'd
just probably never need to force hash context, so we won't see it often.
Luke