From: Austin Ziegler Date: 2003-12-14T08:42:03+09:00 Subject: Re: additional methods for Array + custom operators On Sun, 14 Dec 2003 01:33:55 +0900, KONTRA Gergely wrote: > On 1214, David Garamond wrote: >> Array#chunk(n) -> anArray >> split an array into chunks, each containing at most n elements. > Maybe Array#%() can be a synonim (% - the modulo operator) This isn't completely intuitive, to me. (Yes, I get where it comes from; it's still not completely intuitive.) > How about enabling the user to define custom operators? Like in sml and > prolog? (The charset of the operators is given, and one can define > operators like <<< -+- whatever...) > > What do you think? I think that Matz has demurred on this matter; I also think that it would make parsing unnecessarily difficult. I would personally find it more useful to be able to specify argument sides, e.g.: def mul(left, right); x * y ; end x mul y But even that is of limited utility. -austin -- austin ziegler * austin@halostatue.ca * Toronto, ON, Canada software designer * pragmatic programmer * 2003.12.13 * 18.38.57