> > 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.

If all it does is force hash context, then this:
  $href = %( %somehash );  
would simply mean the same as this:
  $href = \%somehash;             # reference existing hash.
and not this, which may have been what I wanted:
  $href = hash { %somehash };     # reference clone of hash.

Or, in other words, context alone can't turn a simple reference into a
constructor.  Something, somewhere, has to clone %somehash's contents.

If %(...) makes a shallow copy of its innards, as Perl5's { ... } does,
then how do you impose hash context onto something without doing the
copy?  There'd need to be a different syntax to do that, since Perl
can't possibly always DWIM in this case.  %(...), assuming it's valid
Perl6 (I don't remember seeing it or $(...) in any Apocalypse[1]),
means one or the other; it can't mean both.

[1] $(...) has been seen inside double-quoted strings to interpolate
expressions, but that's not the same thing.

-- 
Debbie Pickett http://www.csse.monash.edu.au/~debbiep [EMAIL PROTECTED]
"You can't take me up, you can't wind me down, There's no escape but I'll never
  drown, no wires or strings, no rough and smooth, just like fire and stings,
 watch me closely, watch my every move." - _Wine from the Water_, Alan Parsons

Reply via email to