[1054] in java-interest

home help back first fref pref prev next nref lref last post

Re: Operator Overloading

daemon@ATHENA.MIT.EDU (Nolan Toone)
Thu Aug 17 19:51:09 1995

Date: Thu, 17 Aug 1995 10:38:38 -0700
From: Nolan.Toone@eng.sun.com (Nolan Toone)
To: java-interest@java.Eng.Sun.COM

> I don't understand this.  Given that '+' means addition, why is
> 
>   Complex a, b;
>   ...
>   return a + b;
> 
> any more confusing than "return a.AddComplex (b);"?

1. If I grep for AddComplex I am many times more likely to find the one
   I want and therefor more likely to do it.

2. For the AddComplex if I don't know all the intricacies of "your"
   Complex class it is a reminder that I cannot ASSUME you did the right
   thing.

3. With NO operator overloading if I *DO* find a "+" I *KNOW* what it does 
   and I don't *HAVE* to search for it.
   
   
I started out with a slight leaning toward having operator overloading
but after hearing all the discussion I have been converted and
am "voting" no.

Nolan
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post