[Tutor] Apply() [function calling depends on end parenthese s]

alan.gauld@bt.com alan.gauld@bt.com
Fri Feb 7 07:10:11 2003


> lot different from Java, since I don't think that Java considers its 
> "callables" (method names) to be true objects that can be 
> passed around and referenced with different names.

It certainly doesn't, which is one reason they had to introduce the 
dreadful inner class stuff!

You define a bunch of inner classes(*) that have a single method 
then you can instantiate whichever inner class you need then 
call it's method - yech!

And it's still rubbish because the method names have to be 
the same etc. One reason why for non trivial code C++ often 
works out shorter than Java despite the hype. At least C++ 
includes the concept of method pointers!

Alan g.

(*) Java also allows anonymous inner classes which are directly 
    analagous to Python's lambdas.