A lightweight module for class extensions in D

Christopher Wright dhasenan at gmail.com
Sun Dec 7 05:21:23 PST 2008


Nick Sabalausky wrote:
> I'd rather have a type that all other types derive from. Sort of like 
> "Object" (or is it "object"?), but serves as the base type for all types, 
> not just classes. Not sure if this would be possible though (having vtables 
> for every int and char in the program doesn't sound like a good idea ;) ).

This would be convenient. I think, if Walter were for this idea, it'd be 
implemented via automatic boxing. That gives you the efficiency of using 
int, double, and so forth directly on the hardware. (It's how C# does it.)

That said, I seriously doubt this will be a priority for Walter, ever.



More information about the Digitalmars-d mailing list