Sturcts with constructor (dmd1.x)
bearophile
bearophileHUGS at lycos.com
Tue Jan 12 01:06:29 PST 2010
grauzone:
> > Struct constructors are probably the D2 feature I miss more in D1 :-)
>
> Why?
During optimization phases I sometimes want to convert classes into structs, and then I want to allocate some of those struct instances on the heap and others on the stack. A struct constructor allows me to change as little as possible to the code that uses those new structs.
Bye,
bearophile
More information about the Digitalmars-d
mailing list