On Thu, Sep 07, 2000 at 10:22:17PM -0600, Nathan Torkington wrote:
> Michael G Schwern writes:
> I was expecting those two crufty features to be removed.  If they
> aren't, a third won't hurt.

Might want to add this assumption to the RFC.  Or perhaps another RFC
to junk reset()'s current meaning.


> > > This would be equivalent to:
> > > 
> > >   foreach ($k,$v) (map { $_ => $hash{$_}
> > >              sort
> > >              keys %hash)
> > >   { ... }
> > 
> > What you proposed and what you put in your example doesn't quite play
> > out.  C<sort keys %hash> returns just the sorted keys of %hash, but
> > your foreach example implies that both keys and values would be
> > returned, sorted by key.  Both would be useful.  
> 
> That's what the map is for.  (modulo syntax error in the map :-)

Okay, the example says on thing and the text of the proposal says
another.

So you're proposing that C<sort %hash> act like C<map { $_ =>
$hash{$_} } sort keys %hash>?  I can live with that.  Just clear it up
in the RFC.

-- 

Michael G Schwern      http://www.pobox.com/~schwern/      [EMAIL PROTECTED]
Just Another Stupid Consultant                      Perl6 Kwalitee Ashuranse
<GuRuThuG> make a channel called Perl, and infest it with joking and
fun....it doesnt make alot of sense.

Reply via email to