[fpc-pascal] Re: operator overloading and counting references / creating / destoying anonymous instances

Jürgen Hestermann juergen.hestermann at gmx.de
Sun Jul 31 10:42:45 CEST 2011

Florian Klämpfl schrieb:
 > Why? Searching for operator+ is no more difficult than for function add ?

I don't what I have to search for when looking for the overload function 
of the operator +.  Can I search for the text "operator+"? Never heard 
of this...

Also, when I use a function instead of operator overloading I can use a 
more speaking function name which can be found much easier. If I 
understand it correctly, then dozens of equal named functions exist when 
+ is overloaded for dozens of types. That makes it harder to find.

Nevertheless, the fundamental problem with overloading is, that it hides 
information from the user. I never would have expected that := does more 
than just filling bytes for dynamic arrays. It obscures what realy happens.

More information about the fpc-pascal mailing list