[1901] in java-interest
re: extending String functionality
daemon@ATHENA.MIT.EDU (Andrew Gilmartin)
Tue Sep 19 20:09:27 1995
Date: Tue, 19 Sep 95 15:11:30 EDT
To: java-interest@java.sun.com
From: ajg@cadre.com (Andrew Gilmartin)
>Consider the simple example :
>
>actual :
>
> a.set_value( a.get_value() + 1 );
>
>What I wished to be allowed to write :
>
> a = a + 1;
>or
> a += 1;
I would write
a.increment()
I understand everyone's point about the readability of operators, but
consider the wealth of symbols used in even high-school math. A great
portion of the greek and cyrillic alphabet is used. In this light, the few
C/C++/Java operators we have to overload is laughable.
Therefore, is the expression
Matrix a = new ...
Matrix b = new ...
Matrix c = a . b
really more readable than
Matrix c = a.dotProduct( b )
? Plus, the latter is far more easier to index and reference than the former.
-- Andrew
--
Andrew Gilmartin
Cadre Technologies Inc.
ajg@cadre.com
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com