develooper Front page | perl.perl6.internals | Postings from July 2002

Re: RFC - Hashing PMC's <albie@halfarrabio.di.uminho.pt>

Thread Previous | Thread Next
From:
pdcawley
Date:
July 25, 2002 00:33
Subject:
Re: RFC - Hashing PMC's <albie@halfarrabio.di.uminho.pt>
Message ID:
84vg74ntz9.fsf@despairon.bofh.org.uk
Luke Palmer <fibonaci@babylonia.flatirons.org> writes:

> On 25 Jul 2002 pdcawley@bofh.org.uk wrote:
> > 
> > Personally I don't like the C< is Hashed::ByValues > because it smacks
> > of spooky action at a distance; I much prefer my notion of C< %h{*@x}
> > = 1>. And in Perl 6 I have the horrible feeling that C<< %h = (*@x =>
> > 1) >> would expand to C<< %h = (1,2,3 => 1) >>, leading to a hash that
> > looks like C< { 1 => 2, 3 => 1 } >. Or does the pair constructor
> > force a scalar context on its lhs?
> 
> Well, it depends on precedence.  And I think unary * should have higher 
> precedence than =>, which, mind you, is not a funky comma anymore.
> 
> And if not, that's very wrong, and we shoul do something about it.

But what do commas mean in a hash constructor? Do they even have any
meaning? 

-- 
Piers

   "It is a truth universally acknowledged that a language in
    possession of a rich syntax must be in need of a rewrite."
         -- Jane Austen?


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About