[fpc-devel] (ref types / circles) Re: Defer keyword

Sven Barth pascaldragon at googlemail.com
Fri May 7 22:52:11 CEST 2021


Ryan Joseph via fpc-devel <fpc-devel at lists.freepascal.org> schrieb am Fr.,
7. Mai 2021, 05:58:

>
>
> > On May 6, 2021, at 7:14 PM, Ryan Joseph <genericptr at gmail.com> wrote:
> >
> > This can be detected at compile and at least give a warning. "a" is a
> member of TR and the element type of "a" is TR, then we're assigning TR to
> said array. It's that simple I think.
>
> It also occurs to me that record management operators already allow these
> types of circular references. It's just par for the course with ref
> counting and something programmers need to be aware of.
>

As said the main problem of reference counting on object instances,
especially if enabled by default like the Delphi NextGen compiler did, will
lead to problems in *existing* code and thus is a no-go.

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20210507/0cd1ea72/attachment.htm>


More information about the fpc-devel mailing list