At 10:04 AM -0800 12/19/02, Michael Lazzaro wrote:
On Thursday, December 19, 2002, at 07:55  AM, David Storrs wrote:
On Tue, Dec 17, 2002 at 09:54:52AM -0800, Michael Lazzaro wrote:
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.
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?
Yeah. I don't know what the precise class tree will look like, but as long as you can call these methods on an Array and whatever other collections exist, it works, regardless of how we put them there.
Odds are it'll either inherit from multiple parent classes, one of which does the collection bits, or it'll inherit the collection interface (or whatever we call it). Or it might just be documented to work that way and does, without any actual inheritance of anything.
--
Dan

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

Reply via email to