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

Steven Schveighoffer schveiguy at gmail.com
Sat Jul 16 19:12:56 UTC 2022


On Thursday, 14 July 2022 at 18:29:43 UTC, H. S. Teoh wrote:
> On Thu, Jul 14, 2022 at 10:57:13AM -0700, Ali Çehreli via 
> Digitalmars-d wrote:
>> [1] Other than bike-shedding:
>> 
>> - int[$]      // Not perfect because the array does not have a 
>> length
>>               // (yet) but $ means exactly that in other 
>> contexts.
>
> IMO, this is the best bikeshed color. :-P

Agreed.

> But anyway, this is by far not the first time this issue has 
> been brought up, and it's high time we made some progress on 
> it.  Where's the DIP when you need it?  Actually, I'm almost 
> certain somebody already wrote the DIP, and IIRC even 
> implemented it in a dmd branch.  We should resurrect the 
> DIP/implementation and push it through.  It has been too many 
> years.

https://github.com/dlang/DIPs/blob/master/DIPs/other/DIP1039.md

-Steve


More information about the Digitalmars-d mailing list