DIP61: Add namespaces to D
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Sun Apr 27 12:39:08 PDT 2014
On 4/27/2014 2:04 AM, Andrej Mitrovic via Digitalmars-d wrote:
> And here's std.datetime using a similar trick:
>
> -----
> /++
> Effectively a namespace to make it clear that the methods it contains are
> getting the time from the system clock. It cannot be instantiated.
> +/
> final class Clock
> -----
When you find yourself doing things like that, seriously consider creating a new
module to do it, called "clock".
std.datetime is a giant kitchen sink. This is not the best way to organize
things. Using smaller modules under packages is a much better way.
More information about the Digitalmars-d
mailing list