[fpc-devel] Feature request/discussion - SetLengthNoInit
RORDEN, CHRIS
RORDEN at mailbox.sc.edu
Tue Sep 15 19:22:59 CEST 2020
I think dynamic arrays are really elegant features of Pascal and a strong benefit versus C. However, when working with large projects one encounters situations where one wants more. control. I would advocate allowing developers to optionally use SetLengthNoInit and also allowing user to specify the alignment of dynamic arrays - see issue 0034031. In real world large projects, one encounters situtations where both features are useful. While one could use GetMem for these features, it makes the code less maintainable when some use cases are ideal for dynamic arrays and others for GetMem. These tiny changes would not impact normal users, but allow power users to use this one elegant design for a wide array of use cases. Web searches for "Speed "problem" with SetLength” and "Faster way of initializing arrays in Delphi” suggest others encounter these issues as well.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20200915/b212bfc4/attachment.htm>
More information about the fpc-devel
mailing list