Sven Barth wrote TTestObject = record
i: integer;
class operator = (const aLeft, aRight: TTestObject): Boolean;
end;
[rant]
And this is where I think the new "advanced records" in an abomination of the Object Pascal language. It's almost as if the following is now true:
advanced records = objects = class
"class operator" normally tells me it is related to a Class type (because of the "class" keyword), but in the above code it is a record type. But a record with methods, which is just unnecessary duplication of the Object data type.
Talk about messing with a beautiful "what used to be" clear language syntax. Just because Delphi deprecated the Object type, and then reinvented it by messing with the Record type - why did Free Pascal have to follow that mess.
Regards,
- Graeme -