From: Joel VanderWerf Date: 2005-03-20T06:05:37+09:00 Subject: Re: Paul Graham recommends Ruby ES wrote: >>>Proper OO? Um, well how can you justify: >>> >>>a = [1, 2] >>>a[1] >>> >>>but not: >>> >>>a = lambda{|x|x*2} >>>a(1) >> >>Ever tried a[1]? > > > Yes, but since it looks like indexing and forces to > go back and find out what 'a' is, operator() would > be extremely useful. We will hopefully see that based > on recent comments by matz-uo[1]. If "operator()" is syntax sugar for some method (#call, say), then you still have to go look at what 'a' is to find out what it does. Maybe #() is defined for some Array instances. I _like_ Proc#[] because it can waddle in(*) for Hash#[] and Array#[]. (*) - to waddle in is the same as to stand in, except that the maneuver is performed by a duck.