[1076] in java-interest

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

Re: overloading of operators

daemon@ATHENA.MIT.EDU (Dany St-Amant)
Fri Aug 18 00:50:45 1995

From: Dany St-Amant <staman00@gel.ulaval.ca>
Date: Thu, 17 Aug 1995 13:18:05 -0400
To: java-interest@java.sun.com


Hi,

I'm not in favor of Op-Ov, because the code become harder to read. As an example the famous '+' overloading for string concentation is not the meaning of '+' when i'm typing on a keyboard. When I want to write a "a grave" (french is my mother tongue) for example i have to do 'grave' + 'a'. Then the '+' for char can mean overstriking.

Yes, Op-Ov will be useful for matrix and complex number. Why not let Sun 
implement them... (matric and complex number, not Op-Ov)

A confusing mathematical example is vector, which of the product will the '*' mean, dot-product or cross-product? 

Another example where Op-Ov will be useful (after those who want Op-0v) is graphical. But those the '&' will mean the logical and (intersection of) or the human and (union of)...

BTW, for implementing Op-Ov in C++, designer had to add the reference type. Does Java will have to get this mixing concept to support Op-Ov?

If the answer is no, maybe the 'c = a complexAdd b' is a good concept to look at.


-------------------------------------------------------------------------
| Dany St-Amant                    \ http://www.gel.ulaval.ca/~staman00 |
| Etudiant sous-gradue              \________                           |
|                                           /\     gel133@gel.ulaval.ca |
| Lab. de vision et systeme numerique      /  \  staman00@gel.ulaval.ca |
| Departement de Genie Electrique         /    \   deesse@cmq.qc.ca     |
|  et Genie Informatique                 /      ------------------------|
| Universite Laval, Quebec              /                               |
-------------------------------------------------------------------------
-
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