[977] in java-interest
Operator overloading
daemon@ATHENA.MIT.EDU (Mide Services)
Wed Aug 16 02:36:49 1995
Date: Wed, 16 Aug 1995 01:25:32 GMT
From: Mide Services <mideservices@almide.demon.co.uk>
Reply-To: mideservices@almide.demon.co.uk
To: java-interest@java.sun.com
Hi,
I want to vote on the side of simplicity and clarity. This pulls me
in two directions.
a) absolutely no operator overloading, everything being done with
functions and procedures. Simple to start off with.
b) *Controlled* use of overloaded operators. Simplicity comes when
building up layers of classes.
I always remember making a Turbo Pascal Unit for complex numbers. No such
thing as operator overloading there. It was really irksome to find
oneself instinctively writing a*b + c*d, where you were forced to write:
Add(Mul(a, b), Mul(c, d))
(Most of the expressions were around 60/70 characters long!)
This caused endless stupid bugs in making the UNIT, and using the UNIT.
It actually made for complexity, not simplicity.
ONLY if operator overloading was tightly controlled by the syntax,
tamed, would I vote for it. A bit like using BREAK, EXIT and CONTINUE,
instead of GOTO.
Sandy
--
// Alexander Anderson Computer Science Student //
// Home Fone : +44 (0) 171-794-4543 Middlesex University //
// Home Email : sandy@almide.demon.co.uk Bounds Green //
// College Email: alexander9@mdx.ac.uk London //
// UK //
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com