"Christian" <christians / syd.microforte.com.au> wrote: >"Larry J. Elmore" <ljelmore / home.com> wrote: > > > > Christian> But I do know that [much interesting but IMO offtopic C++ discussion snipped] > > > I am familiar > > > with Lisp. Who can get a degree (or two) and not be? No, I don't use > > > it professionally. I don't use ML professionally either, but that > > > doesn't mean I have no understanding of FP. FP rocks, we all know > > > that. It is also very intellectual, and above most people. But that > > > doesn't mean that we should throw away the notion of functions as > > > first-class-objects. > > > > Huh? > >Ruby does not have functions as first-class objects. You cannot pass a >function as an argument, nor return one as a result. This is patently false. You can construct anonymous functions either new instances of class Proc or using the proc() function from the kernel. You can call them either using func.call(*args) or func[*args]. Ruby supports both functions as first-class objects and full closures. So does Perl. Python does not. This omission in Python is why I was never interested in learning that language. > > > Now, what about continuations as first-class-objects? > > > > As in Scheme? > >Yes, or C++ with microthreads. See class Continuation. Or the callcc function in the kernel. You can call it with its call method. [...] An excellent reference to find out about what all is available in Ruby's classes: http://www.rubycentral.com/ref/index.html I think that there is probably more to Ruby than you currently think. Now to throw fat on your C++ discussion, a friend who used to love C++ and then grew to detest it summarized his beefs with the language somewhat like this: If you have a God's eye view of the problem, then you can construct breathtaking solutions in C++. When you don't then it is easy to go very wrong very fast. Now perhaps you are in a specialized industry. But most of the rest of us don't actually get much of a chance for that God's eye view of the problem. Instead we have constantly changing specs, legacy code, and things adapted to do stuff they were never intended for. Ruby is designed to be usable by mere mortals like us. Cheers, Ben _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com