<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
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 <span style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">SetLengthNoInit
and also allowing user to specify the </span><span style="white-space: pre-wrap;" class="">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.
</span>Web searches for "Speed "problem" with SetLength” and "Faster way of initializing arrays in Delphi” suggest others encounter these issues as well.
</body>
</html>