il Mon, 28 Jun 2004 13:37:21 +0200, "Robert Klemme" <bob.news / gmx.net>
ha scritto::



>> I was going to ask if we could have this:
>> callable arg1,arg2 # implicitly looks for #call
>> callable           # the callable object
>> callable()         # forces application with zero arguments
>> ...
>>
>> what's wrong with this?
>
>Ambiguity.  "callable arg1,arg2" denotes an invocation of the method
>"callable" of "self".  "callable()" also invokes the same method albeit
>without arguments.

well, but ambiguity exists anyway, just think of :

 print p

"p" may stand for self#p, or a local variable named "p". 

More, using a method passed in via argument won't be different from
defining a new one in the current scope explicitly (actually, a method
def in  a method ends up in the self scope), I mean: it's up to the
user to be smart enough, writing something like:

def comb(fun1,fun2) 

instead of 
def comb(print,puts)

>However, you can use #[] like this:

yes, I know, but using #[] is somewhat even worst than #call.

It is better because it looks like () yet it's worst because it just
mimics something hiding it's meaning, whereas #call at least is
explicit.