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

Mike Parker aldacron at gmail.com
Mon Jul 18 01:29:11 UTC 2022


On Monday, 18 July 2022 at 01:25:38 UTC, Mike Parker wrote:
> On Sunday, 17 July 2022 at 16:33:29 UTC, Nick Treleaven wrote:
>>
>> literally mean "length array", i.e. fixed length array. (Why 
>> do we overload the word 'static' here for arrays?)
>
> It's fairly common terminology. I couldn't tell you when it 
> first came into usage, but it's used to describe fixed-length 
> arrays in multiple languages.

And I should add, I don't see it as being an overloaded usage of 
the term. Static generally means "fixed" in one form or another, 
in the sense that the properties of whatever it's applied to are 
determined prior to run time.


More information about the Digitalmars-d mailing list