On Wed, 16 Sep 2020, Benito van der Zander via fpc-devel wrote:
Hi,
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).
well, setlength does not always initialize the array
Of course it does.
That is why the new fpc versions always show a "might be
uninitialized"-warning, when setlength is called without setting the array to
nil first
That is because you pass it an uninitialized array, not because SetLength()
possibly would not do something.
Michael.
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel