What's left to do for a stable D2?

Rainer Deyke rainerd at eldwood.com
Mon Jan 25 00:35:46 PST 2010


dsimcha wrote:
> Are you suggesting that we just get different syntax for it, or is the suggestion
> deeper?  I don't think there's any chance of us getting rid of default
> initializers this late in the game, and I think it's absolutely essential for
> generic code that there be an easy way to get the default initializer for a type.

T init(T)() {
  T v;
  return v;
}


The nice thing about the above is that it also works when T has a
default constructor.


-- 
Rainer Deyke - rainerd at eldwood.com



More information about the Digitalmars-d mailing list