From: Christian Szegedy Date: 2002-09-24T17:40:15+09:00 Subject: Re: are functions/methods "first class objects"? Christoph wrote: > "Christian Szegedy" > ... > >>Using blocks has some other benevolent psychological >>and aesthetical aspect: it prevents an inflation of parenthesis. >>Whatever you prefer: do ... end or >>{ ... }, it gives valuable hints: this is a piece >>of executable code, while the CAML, LISP and smalltalk >>syntax is much less balanced in my eyes. >> >>Therefore, I think that Ruby is at least as elegant >>and powerful in handling functional features as the functional languges. > > > Try writing something as seemly simple as a functional > Proc composition in Ruby (preserving arity etc.) > > class Proc > def *(an_other_proc) > .. > end > end > > > This experience might change your mind ... > > /Christoph > > class Proc def *(other,*parms) self[other[*parms)]] end end