On Thursday, December 19, 2002, at 08:35  AM, Brent Dax wrote:
# > @a.grep( {...} )
# > .map( {...} )
# > .sort;

If we put in my idea of "longest possible signature" when there's no
parens and a low-precedence 'dot' operator, we could do this without the
parens. *ducks*
:-) I forget if there was a problem with longest-possible sig, but I'm certainly all for it. Though I'm not sure if something like

{codeblock}.sort;

might actually have a valid meaning(?), in which case the no-parens version would _still_ be ambiguous. :-P


Honestly, I still don't see what's so evil about R2L as:

@out = sort given map {...} given grep {...} given @a;

It seems to solve all the issues with not needing parens, not requiring {...} to magically eat a trailing comma but-only-sometimes, not needing to declare C<grep>, etc, in more than one place. And it's arguably more descriptive than the older (albeit shorter) syntax. And a *lot* more generically useful for things other than lists/arrays.

$obj.foo(...);
foo ... given $obj; # identical


MikeL



Reply via email to