[fpc-devel] Object upgrades

nickysn at gmail.com nickysn at gmail.com
Tue Jun 4 00:32:33 CEST 2019


On Thu, 2019-05-30 at 01:42 +0200, Sven Barth via fpc-devel wrote:
> Nikolay Nikolov <nickysn at gmail.com> schrieb am Do., 30. Mai 2019,
> 00:52:
> > So, what's with all this FUD surrounding operator overloading not 
> > working with objects? Did you even test it, before screaming
> > "legacy!"? :)
> 
> He's talking about operator overloads that are members of the object
> like what was introduced for records and not about global operators. 
> And yes, there's a small, but important difference: generics can only
> pick up the global ones if the unit containing the operator overloads
> was used inside the unit the generic was declared in (not specialized
> in). 

Thanks for the clarification. I didn't know about this difference and
thought it was just different syntax (namely Delphi copying C++ and C#
instead of following FPC, which had operator overloading long before
Delphi).

Nikolay




More information about the fpc-devel mailing list