dropping parentheses on template instantiation

Leandro Lucarella llucax at gmail.com
Mon Oct 6 12:10:02 PDT 2008


downs, el  6 de octubre a las 17:28 me escribiste:
> > auto v = new Vector with Stack with Tuple with (Positive with real,
> > Matrix with real (3, 3)) ?
> 
> auto v = new Vector of Stack of (Positive of real, Matrix of (real, 3, 3));
> 
> Probably suboptimal. I mostly just threw that out there as a "wouldn't it be cool" to remind people that there are alternatives besides foo[SYMBOL](bar, baz)

And I don't think:
auto v = new Vector.(Stack.(Tuple.(Positive.(real), Matrix.(real))))(3, 3))
or:
auto v = new Vector{Stack{Tuple{Positive{real}, Matrix{real}}}}(3, 3))
or:
auto v = new Vector at Stack@Tuple@(Positive at real, Matrix at real)(3, 3))

Is particulary nice either. You should use alias when nesting too deep,
I guess.

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
Lo último que hay que pensar es que se desalinea la memoria
Hay que priorizar como causa la idiotez propia
Ya lo tengo asumido
	-- Pablete, filósofo contemporáneo desconocido



More information about the Digitalmars-d mailing list