[fpc-pascal]Operator overloading
Sebastian Schuberth
s.schuberth at gmx.net
Sun Oct 1 18:26:32 CEST 2000
Florian Klaempfl wrote:
> > operator overloading does not seem to work as methods of objects /
> > classes. Is there any plan to change that?
>
> Though C++ saupports this, I don't see a real use of this!
Well, I think it's just a nice feature. E.g. if you already have a
complex number class (or vector class or ...) it would be nice to
improve its useability by adding operators instead of writing
z:=z.add(w) whole the time. Besides, I do not consider it to be good
coding style to implement complex numbers as records and some functions.
That's IMHO exactly what OOP is good for.
--
Sebastian Schuberth
More information about the fpc-pascal
mailing list