[fpc-devel] class operator overloads

Ryan Joseph ryan at thealchemistguild.com
Tue Apr 16 22:59:08 CEST 2019

> On Apr 16, 2019, at 4:51 PM, Sven Barth via fpc-devel <fpc-devel at lists.freepascal.org> wrote:
> It's the same problem there.
> The thing however is that FPC's operator overloading support is quite old (compared to Delphi's) and it's possible that it is even older than the support for Delphi's class type. So the global operators simply gained support for classes by "accident" while the ones nested in records came much later by choice. Adding support for operators inside classes would be a choice as well.

Ok now I finally understand. So why is this really a problem? It just means the operator needs to mutate the actual class instead of making a copy like for records, but those are the rules anyways. Given that I still don’t understand why "class operator” isn’t included in classes.

	Ryan Joseph

More information about the fpc-devel mailing list