[932] in java-interest
Re: overloading of operators
daemon@ATHENA.MIT.EDU (Paul R. Potts)
Tue Aug 15 18:04:11 1995
Date: Tue, 15 Aug 95 12:10 EDT
To: java-interest@java.sun.com
From: ppotts@frymulti.com (Paul R. Potts)
I actually have gotten very used to using operator overloading in C++, and
miss it in Java.
However, Java already *has* some operator overloading: you can use + to
concatenate strings. Thus, I immediately found myself also trying to use
+= on them, to no avail. Unfortunately this is a special case, instead of
being an extensible mechanism. I'd like to have these operators available
for defining all kinds of operations on different classes. "Let a thousand
flowers bloom..."
-Paul-
=/=/=/=/= Paul R. Potts =/=/=/=/= Software Engineer, Fry Multimedia =/=/=/=/=
"Geeks With Pecs!" ppotts@frymulti.com http://frymulti.com/~ppotts
Geek 3.0: GL/CS d-(---) s+:>- a27 C+++$ US--- P+ L E--- W++ N++ K w--$ O-
M++$ V+ PS++ PE- Y+ PGP t+ 5? X? R tv->-- b+++ DI++ G+ h-- r++ n+ y++**
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com