gabriele renzi wrote: >>>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". This case can be resolved fairly easily. (If there's an assignment to p then it is a variable) However think about this case: def foo puts 0 lambda { puts 1; lambda { puts 2; lambda { puts 3 }}} end foo # What will this do? foo() # What will this do? x = foo; x # What will this do? x = foo; x() # What will this do? x = foo(); x # What will this do? x = foo(); x() # What will this do? x = foo; y = x; y # What will this do? x = foo(); y = x; y # What will this do? x = foo(); y = x(); y # What will this do? x = foo; y = x(); y # What will this do? x = foo; y = x(); y() # What will this do? x = foo; y = x; y() # What will this do? x = foo(); y = x(); y # What will this do? x = foo(); y = x(); y() # What will this do? Etc. -- there are many cases here. I think the problem is that you can't have optional ()-arguments and () as a call operator as the same time. However we need optional () because of things like this: class Foo attr_accessor :bar end obj = Foo.new; obj.bar # Do you want to type obj.bar() instead? obj = Foo.new; obj.bar = 5; # Do you want to type obj.bar=(5) instead? In other ways: To have this in Ruby we would need to get rid of our method-as-accessors model which I think is a big advantage of Ruby. Regards, Florian Gross