Le 2010-11-04 à 6:34, Jonathan M Davis a écrit :
> Regardless, I think that using a final, uninstantiatable class is the best
> way to create a namespace within a module in D at the moment.
It does pollute the object code with a useless vtable and ClassInfo object
though. As long as there aren't too many of them it's probably fine.
Another way to achieve what you want would be:
template X() {
void func();
}
mixin X x;
// now you can do
x.func();
--
Michel Fortin
[email protected]
http://michelf.com/
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos