Static arrays, typeof and IFTI?

bearophile bearophileHUGS at lycos.com
Tue Oct 11 14:57:08 PDT 2011


David Gileadi:

> It would be nice if this were coupled with an earlier suggestion:
> 
> // large buffer starting with 1, 2 and the remainder zeros
> int[1000] a = [1, 2, 0..];

We discussed this a bit, in past. That syntax gives problems. This is better:

> int[1000] a = [1, 2, ...];

This is nice, but as we said in past, the need for this code is not that common. I've never needed this so far (while as example I'd enjoy to use an array comprehension syntax about every 20 lines of D code, or tuple syntax about as often).

Bye,
bearophile


More information about the Digitalmars-d mailing list