[fpc-devel] Suggestion: reference counted objects

Boian Mitov mitov at mitov.com
Mon Sep 22 20:28:52 CEST 2014


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 at 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 at lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20140922/a2bbd50d/attachment.html>


More information about the fpc-devel mailing list