Fixing C's Biggest Mistake

areYouSureAboutThat areYouSureAboutThat at gmail.com
Thu Jan 5 20:58:52 UTC 2023


On Thursday, 5 January 2023 at 17:30:59 UTC, H. S. Teoh wrote:
>
> Of course it can. See std.array.staticArray.
>

I didn't know that. Thanks. I'll use it.

But in that case, what are people fussing about. Just use that.

Why introduce nonsense such as this: [$] [..]  ???

Mmm .. maybe [?]   ??

btw. I don't consider syntax as bikeshedding. As a programmer, 
nothing is more important to me than sensible (and predictable) 
syntax.

However, instead of having to do this:

auto myArray = [0, 1].staticArray;

I would like the compiler to infer that I'm creating a 
staticArray using this:

int[] myArray = [0, 1].staticArray;

I don't see why it requires my to only ever use auto. I don't 
like using auto here.



More information about the Digitalmars-d mailing list