Re: RFC 196 (v1) More direct syntax for hashes

[email protected] (John Porter) Wed, 6 Sep 2000 22:58:05 -0400
Newsgroups perl.perl6.language.data
Message-ID <[email protected]>
> More direct syntax for hashes
> 
>   Maintainer: Nathan Torkington <[email protected]>
>   Date: 5 Sep 2000
>   Mailing List: [email protected]
>   Version: 1
>   Number: 196

Nat, I was thinking of writing an RFC on a related issue...
but it could piggy-back on this one (196) if you like the idea.

To wit: assignment to C<keys(%hash)> changes the hash's set
of keys so as to contain only the (key-ized) values in the RHS.
Iow,

	keys %hash = @things;

is defined as being equivalent to

	@hash{ @things } = ();

This is to support hash-based set operations in a more
natural way, i.e.

	keys %hash = grep { exists $a{$_} } keys %b;


-- 
John Porter

	We're building the house of the future together.