[fpc-devel] Object upgrades

Michael Van Canneyt michael at freepascal.org
Mon Jun 10 17:25:48 CEST 2019



On Mon, 10 Jun 2019, Ryan Joseph wrote:

> So where do we stand on this?  I have a patch to make it possible allow
> operator overloads that are members of objects but I hear that objects are
> legacy types.  I disagree of course and claim they are the only way to get
> inheritance for records since I’m 99% certain FPC is never going to allow
> record inheritance.

Make that 100% :-)

> Personally I have an immediate use for objects but I
> need them to have operator overloads as members of the object for generics
> support (this isn’t possible with the stand-alone function operator
> overloads).
>
> Could we at least make this upgrade to objects with a mode switch?

If it is under a mode switch (advancedobjects, similar to advancedrecords), 
I see no harm in this. I would even say it is logical to add it. 
I always felt strange that records have it but objects not. 
(same for properties, BTW)

Your other proposal of changing the memory use is of a different caliber,
because it fundamentally changes the way objects are used. 
The objections against that proposal remain intact.

Michael.


More information about the fpc-devel mailing list