Voldemort structs no longer work?

Jonathan M Davis jmdavisProg at gmx.com
Sat Dec 15 13:09:33 PST 2012


On Saturday, December 15, 2012 12:18:21 H. S. Teoh wrote:
> It seems that the only clean way to do this is to use a class instead of
> a struct, since the .init value will conveniently just be null, thereby
> sidestepping the problem.

That would incur unnecessary overhead and probably break all kinds of code, 
because they're then reference types instead of value types, and a _lot_ of 
code doesn't use save propperly. If structs can't do what we need as Voldemort 
types, it's just better to make it so that they're not Voldemort types. 
Voldemort types are a cute idea, and in principle are great, but I don't think 
that it's worth fighting to keep them if they have problems.

- Jonathan M Davis


More information about the Digitalmars-d mailing list