J. Gareth Moreton via fpc-devel <fpc-devel@lists.freepascal.org> schrieb am
Mo., 14. Sep. 2020, 19:00:

> With all this in mind, would there be support for an intrinsic such as
> "SetLengthNoInit" or "SetLengthNoClear" or some similar name that has
> all the benefits of SetLength (especially the reference counting) but
> doesn't initialise new elements to zero? If I'm learning one thing, Free
> Pascal is finding a niche in some scientific applications, and speed can
> be essential sometimes.
>

I'm against adding support for this. Dynamic arrays have guaranteed
behavior. If users find that this behavior is not appropriate for their use
case then they should not use them (or as you already suggested,
preallocate them).

Regards,
Sven

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

Reply via email to