»+« is the name of that operator, like »println«
is the name of a method. We do not define that method as:
public method println
{ public void method( final java.lang.String string ) ... }
So this would deviate from the hitherto Java design.
My own preference would be the introduction of pair
classes, like:
public class( java.math.Complex, java.math.Complex )
{ public java.math.Complex +()
{ return new java.math.Complex
( this.0.real + this.1.real,
this.0.imah + this.1.imag ); } ... }
The name of this class would be:
»( java.math.Complex, java.math.Complex )«
Such an product class would be allowed, whenever an extension
of each of the factor classes is allowed.
The product class has access to all fields of each factor
class (i.e., java.math.Complex) that an extension would be
allowed to access.
The product class is responsible for all operations on a pair
of complex numbers.
The expression
»a + b«
would behave as if a pair (a, b) of this class would be
constructed and then has »+« invoked on the pair, even though
the implementation is free not to really create such a pair
object on the heap for efficiency.
See also
http://blogs.sun.com/jrose/entry/tuples_in_the_vm