Overloading

Stephan Diehl (diehl@cs.uni-sb.de)
Thu, 10 Apr 1997 13:21:07 +0200

What do you think of overloading PROTOs? Can you think
of examples, where this makes sense:

PROTO p [ field t1 f ... ] { body1 }
PROTO p [ field t2 f ... ] { body2 }

Instantiating p { f v } will yield an instance of
body1 or body2 depending of the type of v.

At first glance, the type system will give us overloading
almost for free. On the other hand overloading resolution
can become very complex as in Ada or very unmotivated
and unpredictable as in Java (based on the sum
of conversion costs for each parameter of a method).

Cheers
-- Stephan

---------------------------------------------------------------
Dr. Stephan Diehl Tel.: ++49-681/302-3915
EMAIL: diehl@cs.uni-sb.de WWW: http://www.rw.cdl.uni-saarland.de/private/diehl
---------------------------------------------------------------
There is no place like $HOME
---------------------------------------------------------------