On 9 okt 2010, at 11:22, Johannes Pfau wrote:

> 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
> 
> _______________________________________________
> phobos mailing list
> [email protected]
> http://lists.puremagic.com/mailman/listinfo/phobos


I think it would be better with multiple modules and one module which publicly 
imports the other modules. Then in the main module one can have a 
version(D_Ddoc) statement containing declarations of all the classes and 
functions from the other modules and the corresponding documentation as well. 
But I guess this is something similar to the .di/implementation approach 
suggested by Walter.

-- 
/Jacob Carlborg

_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to