I came across a gotcha today in that the declaration was:

I came across a gotcha today in that the declaration was:

    type
      Tblah = object
      end;

and not:

    type
      Tblah = class
      end;

and it seems that:
a) the enhanced RTTI can not handle of type object, and
b) class helpers can not be used.

So, apart from stopping people to the new features on the type, is there any reason to use an object type (instead of a class type)?

The only documentation I have found is here : http://docwiki.embarcadero.com/RADStudio/XE5/en/Classes_and_Objects#Object_Types

Comments

  1. Nicholas Ring I was exaggerating when I said "downgrade in capabilities". :)

    A lot of stuff was added to "records with methods", but the one thing that didn't get added is a pretty important one: inheritance

    ReplyDelete
  2. Jolyon Smith :-D With record helpers, you got implement one level of "inheritance."

    ReplyDelete
  3. one thing missing in object pascal is multi inheritance, no matter if objects, records or classes... and guess what... no one is dying for that. if  you find yourself fine with records, objects or classes go with the one you love the most, of course you must be aware of their limits and capabilities.

    ReplyDelete

Post a Comment