[fpc-devel] Suggestion: reference counted objects

Hans-Peter Diettrich DrDiettrich1 at aol.com
Mon Sep 22 14:19:30 CEST 2014


Michael Schnell schrieb:
> 
> 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)

AFAIK *variant* records (currently) can not be replaced by something 
else. OTOH it should be no problem to allow for variant parts in other 
structured types, delimited e.g. by a visibility keyword. Variant parts 
should not prevent inheritance, only tricky typecasts, with "open-ended" 
arrays at the end of an record, then have to be handled with more care 
by the coder.

DoDi




More information about the fpc-devel mailing list