Re: Nice to have'it

2000-08-28 Thread John Porter
Damian Conway wrote: > I have a draft RFC that proposes that the LIST argument of a > grep be optional in a hash slice, and default to the key list > of the sliced hash. So: That's a waste of RFC paper, Damian. But let's generalize it a bit, and say that Perl6 should have a standard intrinsic

Re: Nice to have'it

2000-08-28 Thread Damian Conway
> Well, $hash{/re/} would only evaluate to a single scalar. > More likely, you'd want @hash{/re/}, which would be > equivalent to @hash{ grep { /re/ } keys %hash }. I have a draft RFC that proposes that the LIST argument of a grep be optional in a hash slice, and default to the key li

Re: Nice to have'it

2000-08-28 Thread John Porter
David Corbin wrote: > raptor wrote: > > > > $hash{/re/} i.e. this is the same like > > > > my @res; > > foreach my $k (keys %hash) > > { > > if ($k =~ /re/) {push $hash{$k},@res} > > }; > > > > OR > > keys %hash{/re/} > > values %hash{/re/} > > each %hash{/re/} > > Way cool. I'd love this

Re: Nice to have'it

2000-08-28 Thread David Corbin
raptor wrote: > > Hi, > > I have couple of ideas which may or may not worth it, so I didn't > wrote the RFC but will list them here in short. > Here are the nice to have'it. > > 1. There will be good to have some sort of "match and/or assign" operat

Re: Nice to have'it

2000-08-28 Thread Ed Mills
said in Monterey this year (I paraphrase), "Difficult things should become easy, and the impossible should become difficult." Following that logic- shouldn't easy (ceiliing) become trivial (a primitive op)? my 2c >From: "raptor" <[EMAIL PROTECTED]> >To: <[

Nice to have'it

2000-08-28 Thread raptor
Hi, I have couple of ideas which may or may not worth it, so I didn't wrote the RFC but will list them here in short. Here are the nice to have'it. 1. There will be good to have some sort of "match and/or assign" operator for structures i.e. HASHES. Can't still figure