In general, records and classes are inherently the same thing (and in C++ are 
indeed practically interchangeable). The only real difference in Delphi/FPC is 
that records are instantiated in the stack, the objects in the heap, and the 
artificial restriction on record inheritance.
Now adding the option classes/objects to be instantiated in stack is a risky 
one, however having record hierarchies poses very little risk.

With best regards,
Boian Mitov

-------------------------------------------------------
Mitov Software
www.mitov.com
-------------------------------------------------------

From: Michael Schnell 
Sent: Monday, September 22, 2014 2:03 AM
To: fpc-devel@lists.freepascal.org 
Subject: Re: [fpc-devel] Suggestion: reference counted objects

On 09/20/2014 08:04 PM, Boian Mitov wrote:

  This is actually a very good idea IMHO!
  I would vote for it. Record inheritance is something I miss badly in Delphi.

As said in a previous mail: why have "Record" ad all, if you want things like 
inheritance (and "active" properties, ...) Maybe multiple brands of  type if 
"class" would be more straight forward (making "record" just an alias for 
portability) 

-Michael



--------------------------------------------------------------------------------
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to