At 9:54 AM -0800 12/17/02, Michael Lazzaro wrote:
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;
Those are simple method calls, so there's no reason we shouldn't support them, though they will *only* work if each returns an actual array, rather than a list. They are, however, not the same as doing:

@b = @a grep {} map {} sort {};

because that's true L2R, as it'll work for:

@b = (*@a, *@b, foobar()) grep {} map {} sort {};

That can't work as methods of the list, unless we're wildly redefining how lists work, which I don't think we're going to do.

*That's* the sort of way, the L2R way, that I'd argue against. Shifting directions in mid-stream is, well, really tough for us old codgers.

And you can't get rid of the old way, since it's just implicit function calls. To forbid

@b = sort {} map {} grep {} @a;

is the same as forbidding

@b = sort({}, map({}, grep({}, @a)));

which I think would be... unwise. As would chopping sort/map/grep and friends from the language entirely. One of the hallmarks of perl is its richness, and I think losing that would be ill-advised.
--
Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk


Reply via email to