Jonathan Blow demo #2

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Thu Dec 11 18:16:52 PST 2014


On 12/11/2014 1:49 PM, bearophile wrote:
>>> He suggests a way to optionally specify the type of array indexes. In a D-like
>>> syntax it could be:
>>>
>>> enum N = 10;
>>> float[N : ushort] a1;
>>> float[: ushort] a2;
>>
>> I don't see any point to this.
>>
>>
>>> My point of having this in D is to optionally increase strictness of the array
>>> indexes, to avoid some bugs when you handle many arrays.
>>
>> Doesn't make sense to me.
>
> I explained the topic here (note this not exactly the same thing
> discussed by Jonathan Blow:
> http://forum.dlang.org/thread/qilkslpfwvkbqlradhit@forum.dlang.org

I don't see support for the notion of a ushort index.



More information about the Digitalmars-d mailing list