On Mon, 12 Mar 2001, David Alan Black wrote: > I'm not sure about this. I've never missed it. It can be added to > Enumerable, already, in one line (though obviously core inclusion > I agree that its simple. However, I find it useful enough to warrant inclusion. The reason its important to discuss extensions to the core/std/builtin libs is that whats in there shapes how people will program in Ruby. We can't expect everyone to know stuff implemented in custom extensions. > As for Haskell and functional programming: > > I'm confused about the whole status of these things, with respect to > Ruby. There's been talk from time to time about borrowing standard > functions from Haskell, or emulating a functional paradigm in Ruby. > It always starts out sounding intriguing and well-defined, but then > seems to end up as a kind of miscellany of possibly useful functions. > > At that point, the relation to functional programming becomes unclear, > and I would suspect/speculate that someone really immersed in the > world of functional programming would not accept the idea that > transliterating a few functions to an OO language really establishes > any meaningful connection with functional programming. > > I'm not saying that the functions we're talking about are trivial or > bad. Nor am I saying that, if they're adopted into the core, we > should deliberately create non-standard names for them. I'm just a > little uneasy about describing a very partial, very selective > borrowing from functional programming as really signifying a relation > between functional programming and Ruby. > > In fact... I think this kind of thing (a functional programming > emulation layer, or something) is perfect for a nicely-crafted, > self-standing library, in Ruby. And I think that may even be where > this particular thread started :-) > I surely hope my post didn't make anyone think adding these functions would make functional programming possible in Ruby. I simply singled them out of the (hopefully some day more complete) functional programming lib/extension I've started. I've got LazyArray's working in there for example (for compact specification of inifinite sequences) and list comprehension is coming along nicely. I singled these useful methods out because they have shown to be powerful idioms in Haskell and might be useful also for us. As you say a func prog emulation layer is more suitable as a self-standing library. Regards, Robert