auto arr = [1, 2, 3] should be a static array, not a GC allocated array

Ogi ogion.art at gmail.com
Sat Jul 16 15:12:19 UTC 2022


On Thursday, 14 July 2022 at 13:30:58 UTC, jfondren wrote:
> On Thursday, 14 July 2022 at 13:14:59 UTC, ryuukk_ wrote:
>> It is misleading, nobody expect this to be GC allocated
>
> People expect that who try to append to it later on in the 
> function.

And this also should be killed with fire. We need a clean 
distinction between static arrays, GC-controlled dynamic arrays, 
and slices.


More information about the Digitalmars-d mailing list