[fpc-pascal] Feature announcement: Dynamic array extensions
Ryan Joseph
ryan at thealchemistguild.com
Sun Jun 3 10:22:08 CEST 2018
> On Jun 3, 2018, at 3:15 PM, Sven Barth via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
>
> Because operator overloads are static methods not normal methods.
I don’t understand. Why aren’t both those variants possible? They’re both static I believe. The first is mutating the left side value and the second is a clone (the most common operation for += )
class operator + (var left: TIntArray; const right: T);
class operator + (constref left: TIntArray; const value: T): TIntArray;
Regards,
Ryan Joseph
More information about the fpc-pascal
mailing list