Matthew Smillie <M.B.Smillie / sms.ed.ac.uk> writes: > On Jun 12, 2006, at 12:42, Christian Neukirchen wrote: > >> Matthew Smillie <M.B.Smillie / sms.ed.ac.uk> writes: >> >>> Ruby does have a lot going for it in this regard: first-order >>> functions, >> >> Did I miss something? > > I probably should have said "higher-order functions" or "first-class > functions". I admit to a habitual disfluency when it comes to this > distinction**. Or am I missing what you think you're missing? Well, Ruby doesn't have first-class *functions*. It "just" has blocks, which allow code to be passed around as *objects*, not as *functions* (read: methods). Compare mymethod(foo) with myblock.call(foo). > matthew smillie > > ** in my defence, they're very closely related, and first-order > functions are a subset of higher-order functions, so I claim that I > was technically correct (which is the best kind of correct). I see what you mean, but it's important to recognize that Scheme has true first-class functions (being a Lisp-1), whereas there is a fundamental difference between Blocks/Procs/lambdas and methods (being a Lisp-2). Since Ruby is considered an OO language and Scheme a functional language, this is fine. -- Christian Neukirchen <chneukirchen / gmail.com> http://chneukirchen.org