Changeset 442, implicit Vs explicit

bearophile bearophileHUGS at lycos.com
Tue Apr 27 10:55:04 PDT 2010


Michel Fortin:
> Ouch! I agree with the idea, but can't you find a better syntax? What 
> about this:
> 
> 	immutable ubyte a[256] = [1,2,3,4...]; // rest of array is padded with 4s.
> 	immutable ubyte b[256] = [1,2,3,4]; // error: not enough values

I think this is better (note the last comma) to avoid confusion with FP values:
immutable float a[10] = [1., 2., 3., 4., ...];

Nice, and better than mine. Basically here I can accept almost any syntax that is explicit :-)
Thank you :-)

Bye,
bearophile



More information about the Digitalmars-d mailing list