Proposal : allocations made easier with non nullable types.

Nick Sabalausky a at a.a
Mon Feb 9 23:24:55 PST 2009


"grauzone" <none at example.net> wrote in message 
news:gmpe6g$adf$2 at digitalmars.com...
> Alex Burton wrote:
>
> For structs, use opCall() to initialize them. opCall is the best way to 
> initialize a struct, because struct literal are totally utterly useless.
>
> If you use opCall to initialize classes as well (see above), then the 
> syntax for initializing structs and classes will be exactly the same.
>

That's good advice for using D today, but it's still subject to human error. 
Making "X x;" serve as an implicit "X x = new X();" for classes would 
eliminate that human error. 





More information about the Digitalmars-d mailing list