Darren Duncan wrote:
So "filter" is now my preference for a new name, and if
"grep" is kept, then that can be an alias for it;
We've also had a policy of removing synonyms (e.g. "for"/"foreach"),
so I think we should have only one name for any one function.
Damian
At 6:26 AM +0200 9/19/06, Damian Conway wrote:
The standard--and self-explanatory--CS term for this operation has
always been "filter", which is also currently used by Python, Scheme,
Haskell, and numerous other languages, so *if* we're going to change
it from "grep", we ought to change it to "fi
We have gone to a great deal of trouble to remove homonyms (such as
"eval"/"eval","select"/"select","do"/"do"/"do") from Perl 6, so I
would be very unhappy to see us create a new one by re-using "where"
to mean two different things.
I don't object in principle to renaming "grep" to something more
Author: larry
Date: Mon Sep 18 20:33:07 2006
New Revision: 12185
Modified:
doc/trunk/design/syn/S02.pod
Log:
Some handwaving about type equivalence.
Modified: doc/trunk/design/syn/S02.pod
==
--- doc/trunk/design/syn/
Darren Duncan wrote:
> Putting aside legacy issues for the moment,
>
> I suggest that it might be appropriate to rename the .grep list operator
> to .where, so we can say, for example:
>
> @filtered = @originals.where:{ .foo eq $bar };
>
> We already have a "where" keyword in the language, whi
Trey Harris schrieb:
> > @filtered = @originals.where:{ .foo eq $bar };
>
> Note that this can be written:
>
>@filtered = any(@originals) ~~ { .foo eq $bar};
I generally like "words" more than sequences of non-word characters as
you can quickly remember/guess the meaning, what's not always the
At 3:36 PM -0700 9/18/06, Trey Harris wrote:
In a message dated Mon, 18 Sep 2006, Darren Duncan writes:
I suggest that it might be appropriate to rename the .grep list
operator to .where, so we can say, for example:
@filtered = @originals.where:{ .foo eq $bar };
Note that this can be writte
In a message dated Mon, 18 Sep 2006, Darren Duncan writes:
Putting aside legacy issues for the moment,
I suggest that it might be appropriate to rename the .grep list operator to
.where, so we can say, for example:
@filtered = @originals.where:{ .foo eq $bar };
Note that this can be writt
Putting aside legacy issues for the moment,
I suggest that it might be appropriate to rename the .grep list
operator to .where, so we can say, for example:
@filtered = @originals.where:{ .foo eq $bar };
We already have a "where" keyword in the language, which is used for
very similar thing