Changeset 442, implicit Vs explicit

Walter Bright newshound1 at digitalmars.com
Tue Apr 27 09:32:23 PDT 2010


bearophile wrote:
> Walter Bright:
> 
>> I have used it, though I use statically initialized arrays at all very
>> rarely. An example is the _ctype[] array which leaves the upper 128 entries
>> unspecified, and therefore 0.
> 
> Both Phobos and druntime seem to contain a copy of the module ctype (o.O), it
> contains the array: immutable ubyte _ctype[128] =
> [_CTL,_CTL,_CTL,_CTL,_CTL,_CTL,_CTL,_CTL, immutable ubyte _ctype[128] = [...
> 
> In both cases the array is defined as 128 items and I have counted it
> contains 128 items. So I think you are wrong.

No, it also exists in the C runtime.


> You have not commented about the other syntax I (and others) have suggested
> (that has a different purpose, it's not meant to replace the item count
> test): arr[$] = [/*...*/]; So I guess you are not so interested in this too.

D is full of syntax, at some point adding more and more syntax to deal with more 
and more obscure cases is not a net improvement. There's a point of diminishing 
returns.




More information about the Digitalmars-d mailing list