Tom Christiansen wrote:
> >If it were possible to assign to the keys of a hash, we'd be
> >a lot closer to our ideal:
>
> > keys(%intersection) = map { exists $set1{$_} ? ( $_ => 1 ) : () } keys<SNIP>
>
> >but this is not currently legal perl.
>
> keys %HASH = LIST;
>
> is really
>
> @HASH{ LIST } = ();
Sure. Would you have any great objection to adding the alternative syntax?
It's a lot clearer, imho: the source and dest of the assignment are on the
RHS and LHS of an =, respectively.
--
John Porter
We're building the house of the future together.
- Re: RFC 179 (v1) More functions from set theory to manipu... Tom Christiansen
- Re: RFC 179 (v1) More functions from set theory to manipu... Gael Pegliasco
- Re: RFC 179 (v1) More functions from set theory to m... Jeremy Howard
- Re: RFC 179 (v1) More functions from set theory ... Gael Pegliasco
- Re: RFC 179 (v1) More functions from set the... Tom Christiansen
- Re: RFC 179 (v1) More functions from set... Tom Christiansen
- Re: RFC 179 (v1) More functions fro... Gael Pegliasco
- Re: RFC 179 (v1) More functions fro... Buddha Buck
- Re: RFC 179 (v1) More functions fro... John Porter
- Re: RFC 179 (v1) More functions fro... Tom Christiansen
- Re: proto-RFC: keys(HASH) as lvalue... John Porter
- Re: proto-RFC: keys(HASH) as lvalue... Tom Christiansen
- Re: proto-RFC: keys(HASH) as lvalue... Bart Lateur
- Re: proto-RFC: keys(HASH) as lvalue... John Porter
- Re: RFC 179 (v1) More functions fro... Johan Vromans
- Re: RFC 179 (v1) More functions fro... Gael Pegliasco
- Re: RFC 179 (v1) More functions fro... Tom Christiansen
- Re: RFC 179 (v1) More functions fro... Gael Pegliasco
- Re: RFC 179 (v1) More functions fro... Chaim Frenkel
- Re: RFC 179 (v1) More functions fro... Gael Pegliasco
- Re: RFC 179 (v1) More functions fro... Tom Christiansen
