Umm... I think some of these recent messages have had typos between L2R and R2L. (?) In that people seem to have been arguing against themselves. (??) I'll try using --> and <--.

On Monday, December 16, 2002, at 05:45 PM, Dave Storrs wrote:
Just so I'm clear, are you saying that you think L2R is a bad idea,
and should not be supported?  Or just that it has not yet been
demonstrated that this is a good idea?
We _must_ (for some value of "must" that is real close to being a 100% drop-dead requirement) support --> (L2R), in the form of

@a.grep( {...} )
.map( {...} )
.sort;

i.e. however else we do it, array processing functions _MUST_ exist as methods of Array. That may not be the preferred spelling, or anything close to attractive, but it would be simply pathetic for it not to exist.

Almost everyone's been clamoring over how we want OO and OO is cool and everything should be treatable as an object. If arrays are objects, the above is How It's Gonna Look, unless we want to invent a method-call syntax for arrays that is completely different from that of scalars.

So if anyone _doesn't_ want the above dot-syntax to exist AT ALL, please explain the rationale!

_However_, the above code is probably the most formal usage of the array-manipulation methods. If we want another way to say it, e.g. <-- (R2L) or a prettier --> (L2R), we could probably have it. But it would have to be in _addition_ to the above, not _instead_ of. We can add the Perl5-style:

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

if we want to, but I don't think it should be given a free ride in Perl6. It's not regular (not like anything else in the language), sucks up those names as globally reserved (as opposed to merely methods of arrays), implies more possible wacky behaviors of curlies, and cannot credibly be tortured into being OO upon @a.

So whether prettyified <-- (R2L) and --> (L2R) forms exist and what they look like, we can argue about. But the method form (L2R) @a.grep, etc, simply _must_ be valid, if not encouraged.

MikeL



Reply via email to