ES <ruby-ml / magical-cat.org> writes:

>>>> >> You cannot do lambda{|x|x*2}(2), yes.
>>>> >
>>>> > Yup, and for calling functions objects in general.
>>>>
>>>> Yes.  And actually this is proper OO.  I couldn't justify mylambda()
>>>> somehow.
>>>
>>> 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].

But with localvar(), it can be even more confusing.  Besides, method
calls are possible without ().  Doing it properly is a hard job, and I
can understand Matz doesn't want to do it (yet).  Rather don't have
that feature at all than in a crippled and inconsistent way.

> [1] http://redhanded.hobix.com/inspect/functionCall.html
-- 
Christian Neukirchen  <chneukirchen / gmail.com>  http://chneukirchen.org