Print

Print


Clune, Thomas L. (GSFC-610.3) wrote:
> I agree about the interfaces being visible, but _not_ the _arbitrary_ 
> names that I have chosen simply to make them unique.   Methods 
> "add()", "print()", etc are good names.   Overloading them is good 
> (TM).   Having to also expose addInteger(), addReal(), addComplex() 
> ... is unnecessary from the clients point of view.   I'm sure I'll get 
> used to it, but my Java colleagues will continue to taunt me.  :-)
Just use new names for the specific bindings.  You can't dispatch to the 
bindings in the base type anyway (because you can't have an object that 
has an abstract dynamic type), so there's no need to pretend you're 
overriding them.

If we insist you can't use the same name, the tragedy is that you have 
to guess whether your name is new, and will remain forever "new" even if 
the provider of the module that defines your base type does some 
maintenance on it after you retire, and creates a binding that has the 
same name as the one you managed, by good luck or psychic powers, to 
choose to have a different name at the time you developed it.
--

Van Snyder