I still don't think we have a consensus that grep needs to be renamed,
much less what it should be renamed to. To me, "keep" implies throwing
the rest away,I.e., modifying the list.  "Select" has the advantage of
lacking that connotation. To avoid dissonance with the two perl5
"select"s, we could go with a synonym like "choose" or, in the 4-char
category, "pick". But my vote is still to keep grep as "grep".

On 9/20/06, Aaron Sherman <[EMAIL PROTECTED]> wrote:
Damian Conway wrote:
> In other words, classify() takes a list of values, examines each in
> turn, and ascribes a "label" value to it. The call returns a list of
> pairs, where each pair key is one of the label values and each pair
> value is an array of all the list values that were ascribed that label.
> Personally, I don't have a problem with us keeping 'grep'. However, if
> we do decide to change the name, I suspect 'keep' might be readable,
> short, SWIM, and not confused with other operations:
>     my @evens = keep { $^num % 2 == 0 } @numbers;

OK then. Just so that I can type of the final result in S29, let's see
if everyone agrees to several points that have been made in this thread:

1. "classify" is the real grep
2. convenience function, "keep" is probably a macro
3. "use List :compat" will get you a "grep" just as it will likely get
you "mv" on the OS module, etc.

Is any of this going to break the bank? If not, I'll get it in today.


Reply via email to