On 9/25/13 9:13 AM, kraybit wrote:
On 9/23/13 20:52 , Jacob Carlborg wrote:
On 2013-09-23 17:47, Manu wrote:
   X x = new!(X!arg(args...)); // ewoo, paren spam...

Why not:

X x = new!X(args);


I believe Manu's example was about X having template parameters as well.
As in
     auto v = new Vec3!float(0,0,0);


Either way, what would it be then? a) or b)?
     auto v = new!(Vec3!float)(0,0,0); // a)
     auto v = new!(Vec3!float(0,0,0)); // b)
?


And which would be the same as:
     auto v = new!Vec3!float(0,0,0);
?

I'd assume it's the same as a), no?

I think there's no need to change the syntax of new, as long as it's lowered into a template. Right now it's special cased inside the compiler.

Andrei

Reply via email to