<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body smarttemplateinserted="true">
<div id="smartTemplate4-template"><br>
Hi,<br>
<br>
<blockquote type="cite">
<div dir="auto"><br>
</div>
<div dir="auto">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).</div>
</blockquote>
<br>
<p>well, setlength does not always initialize the array <br>
</p>
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<br>
<br>
Bye,<br>
Benito </div>
<br>
<div class="moz-cite-prefix">On 15.09.2020 11:11, Sven Barth via
fpc-devel wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAFMUeB9nuc+O3ubqhKg_fc7Wg-GfAQ3pBB_95W2o+w-aWm8PKw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<div dir="auto">
<div>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">J. Gareth Moreton via
fpc-devel <<a
href="mailto:fpc-devel@lists.freepascal.org"
moz-do-not-send="true">fpc-devel@lists.freepascal.org</a>>
schrieb am Mo., 14. Sep. 2020, 19:00:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">With all
this in mind, would there be support for an intrinsic such
as <br>
"SetLengthNoInit" or "SetLengthNoClear" or some similar
name that has <br>
all the benefits of SetLength (especially the reference
counting) but <br>
doesn't initialise new elements to zero? If I'm learning
one thing, Free <br>
Pascal is finding a niche in some scientific applications,
and speed can <br>
be essential sometimes.<br>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">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).</div>
<div dir="auto"><br>
</div>
<div dir="auto">Regards, </div>
<div dir="auto">Sven </div>
<div dir="auto">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
fpc-devel maillist - <a class="moz-txt-link-abbreviated" href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel">https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>