[fpc-devel] Question on constref

Sven Barth pascaldragon at googlemail.com
Thu Feb 2 14:25:07 CET 2023


Ondrej Pokorny via fpc-devel <fpc-devel at lists.freepascal.org> schrieb am
Do., 2. Feb. 2023, 12:09:

> Delphi cannot do it. FPC rocks!
>
> The only disadvantage is that you get a FreeAndNil copy for every type
> you pass into the parameter (?)
>
> Do we want to change it in SysUtils? :)
>

As you might have noticed you need to add a modeswitch to enable this and
this modeswitch is there for a reason (namely that this could lead to wrong
code being used). So by default no one would benefit from this addition and
probably not even know that it's there.

Regards,
Sven

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


More information about the fpc-devel mailing list