On Saturday, February 8, 2003, at 02:53 AM, Luke Palmer wrote:
If you're talking about your own C<for> example, actually, this wouldI'm personally still hoping for a unification there... see my note from Jan 23, "Re: Why C<map> needs work" for some ideas. Maybe someone will think of a way to do it, at some point.
match it better:
grep $x <- @list { $x eq 3 }
But if you're talking about A4's:
grep @list -> $x { $x eq 3 }
Which is very close to (one of) the currently valid:
grep @list: -> $x { $x eq 3 }
(In Perl 6 there will be many ways to do C<map>s and C<grep> syntactically)
My guess is that Larry wanted $x to appear before the block it will be used in, and that C<grep>'s swapping of block and list (when compared to C<for>) makes doing so ugly (IMO).There has been some inconclusive discussion about unifying those two syntaxes. As you can see from my example above, you can get pretty close, so nobody seems to be complaining anymore.
We stopped that discussion because Dan S. begged for mercy, at least until A6 comes out.
MikeL