[phobos] datetime review
Johannes Pfau
johannespfau at googlemail.com
Sat Oct 9 02:22:26 PDT 2010
On 09.10.2010 07:29, Jonathan M Davis wrote:
> Really, the ideal would be to have all of it in one module but have the code
> split up into several files. The closest way that I was aware to do that was to
> use a single module which publicly imported the others.
You could also use multiple files and combine those in one module using
string mixins and import:
module std.datetime;
mixin(import("std/datetime_core.d"));
mixin(import("std/datetime_duration.d"));
mixin(import("std/datetime_interval.d"));
But this also brings lots of problems. I don't know whether it produces
one ddoc file, line information for compile errors will be useless
(maybe the #line directive could help by using #line 1 "datetime_core.d"
in the implementation files)
--
Johannes Pfau
More information about the phobos
mailing list