[Lazarus] Specialize for Object

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Thu Jun 11 10:43:26 CEST 2015

On 2015-06-09 10:24, Sven Barth wrote:
>   TTestObject = record
>      i: integer;
>       class operator = (const aLeft, aRight: TTestObject): Boolean;
>   end;


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.

  - Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal

More information about the Lazarus mailing list