On Fri, 22 Apr 2011, Florian Klämpfl wrote:
(I suspect this is why it is possible to add type restrictions in the Delphi/.Net implementations) 2. If I have my own overloaded version of '+' for a record, the above means that it cannot ever be used for generics, while it will be used for all my other code. Say I define a type, and decide not to put the operators inside the record, for whatever reason. I am happily unaware of generics. Along comes an afficiniado of generics, and wants to use my type in generics, but hits the above problem. He is stuck.No. He can define a record helper operator.
Which then simply repeats what I already had ? Very efficient :-)
Michael.
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal