www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Proposal: inferring RHS for new expressions

This is probably never gonna happen, but...

All things being equal, I prefer when I'm making a bunch of declarations 
that all the types be lined up on the left for easy reading.

However current auto syntax makes it much easier to initialize class 
objects like this:

    auto x = new SomeBigClassName!(float);

What I'd rather be able to do in such situations is something more like:

    SomeBigClassName!(float) x = new auto;

or even just

    SomeBigClassName!(float) x = new;

Given constructor args I think new(1,2,3) would conflict with current 
syntax.  But new auto(1,2,3) should be ok I think.

--bb
Aug 29 2007