David Storrs:
# I don't care about the syntax at all, I just made up
# something that seemed moderately clear to me. In point of
# fact, I hope we DON'T use the above syntax, or anything else
# where you are required to have an operator between each
# element of the pipeline.
How else would you disambiguate?
# > 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.
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*
# Well, I generally agree with you, but with an important nit:
# they shouldn't be members of Array, they should be members of
# Collection, Array's base class. Otherwise, what if I define
# an UnorderedMultiSet class and I want to grep over it?
Fine. What do you grep over when you're grepping a hash? .k? .v? .kv
and pass two values in? Pair objects?
# > 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.
#
# Hmmm...I don't suppose that, with implicit promotion to
# Array, we can get out of this with the indirect object
# notation, can we? I'm not sure what it looks like this week,
# but perhaps we could make a minor requirement change (e.g.,
# need a comma on the methods and a trailing : on the @a) and
# shoehorn it into something like this:
#
# @out = sort map {...}, grep {...}, @a:;
Eww. Indir object is like this:
@out = sort map grep @a: {grepblock} {mapblock};
#I'm not sure you can actually leave out the
# parens--it might be ambiguous.
I assume you can see why this is a Bad Thing.
--Brent Dax <[EMAIL PROTECTED]>
@roles=map {"Parrot $_"} qw(embedding regexen Configure)
"If you want to propagate an outrageously evil idea, your conclusion
must be brazenly clear, but your proof unintelligible."
--Ayn Rand, explaining how today's philosophies came to be