From: Sean O'Dell Date: 2004-06-29T05:45:26+09:00 Subject: Re: (oddity) applying objects with #call() implicitly On Monday 28 June 2004 13:37, Florian Gross wrote: > Sean O'Dell wrote: > >>>I was going to ask if we could have this: > >>>callable() # forces application with zero arguments > >>>what's wrong with this? > >> > >>Ambiguity. > > > > Couldn't ambiguity be resolved by giving the callable object priority > > over a method, and using self to call the object#method? > > > > [...] > > def anothermethod(mymethod) > > mymethod # => "object#call" > > self.mymethod # => "object#mymethod" > > end > > end > > There's still an ambiguity problem with this: When using "mymethod" you > could also want to refer to the "mymethod" argument *without* calling it > at the same time. Could mymethod mean the object and mymethod() be used to make the method call? That was gabriele's suggestion; could that still be used, using self to differentiate the callable object call from the self.method call? Sean O'Dell