Does D have too many features?

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Apr 30 12:14:53 PDT 2012


On Mon, Apr 30, 2012 at 09:06:06PM +0200, Andrej Mitrovic wrote:
> On 4/30/12, H. S. Teoh <hsteoh at quickfur.ath.cx> wrote:
> > Then
> > you can write:
> >
> > 	uint[] a = [
> > 		2: 100,
> > 		10: 200
> > 	]
> >
> > and it will be equivalent to:
> >
> > 	uint[] a = [0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 200];
> 
> But you can already use this syntax right now?

Yes I know you can, it was more of using this syntax for user-defined
types without allocating a temporary array.


T

-- 
Computers shouldn't beep through the keyhole.


More information about the Digitalmars-d mailing list