The demise of T[new]

Leandro Lucarella llucax at gmail.com
Mon Oct 19 08:24:50 PDT 2009


Leandro Lucarella, el 19 de octubre a las 12:13 me escribiste:
> Leandro Lucarella, el 19 de octubre a las 11:57 me escribiste:
> > slice.dup should return an array.
> 
> To avoid making the language aware of the array type, slice.dup can be
> removed and use an array constructor instead:
> 
> auto a = slice.dup;
> 
> should be:
> 
> auto a = array!T(slice);
> 
> This way, I think the language only have to know about slices.

Unless you want to have an appendable array type in CTFE. I guess the
language should know about array anyways :S

(I should read the entire thread before posting)

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
Si el enemigo se siente abatido, recuérdele que su familia está lejos y
que mientras siga la pelea él se estará perdiendo el crecimiento de sus
hijos. Si está feliz, recuerdele de la existencia de su familia
política, en especial de los cuñados que tienen sexo con sus hermanas.
	-- Ricardo Vaporeso. De la desmoralización del enemigo.



More information about the Digitalmars-d mailing list