On 12/11/10 1:17 AM, Jonathan M Davis wrote:
Except then you have to go out of your way to do that. It's no longer the default.
Well, as the user would explicitly import that module anyway, it's just a few extra characters. You could always team up with bearophile to push only importing the module name into scope by default though, I guess. ;)
I personally have one major problem with classes used to fake namespaces in datetime – that it's going to be part of the standard library. I mean, if you personally prefer classes to the »canonical« approach of using modules for grouping related code, that's fine with me, but now this is part of Phobos, and I'm pretty sure that some people will ask (at least themselves):
Hey, so there are these neat things called modules in D which are supposed to be used for organizing your code, but still they have mixed different concepts together in that datetime part of the standard library, using classes as pseudo namespaces so things don't get mixed up too much – why that?