D modules/sourcecode organisation/filesystem mapping

Sean Kelly sean at f4.ca
Fri May 12 16:53:10 PDT 2006


Chad J wrote:
> Bruno Medeiros wrote:
>> FunkyM wrote:
>>
>>>
>>> Yeah, infact it is a basic change mainly on the "module" keyword. My 
>>> "extended"
>>> explaination might be a bit too much information on one shot.
>>>
>>> Right now you for a file "/foo/bar.d" you would have to write "module 
>>> foo.bar;"
>>> and you can NOT have a file "/foo.d" with "module foo;".
>>>
>>> These changes make it possible to say "module foo;" in "/foo/bar.d" 
>>> and use
>>> "/foo.d" with "module foo;" which results in "merging" the two scopes.
>>>
>>
>> What happens when both "module foo;"'s have module 
>> constructors/destructors ?
>>
> 
> Why not just execute both?  Almost makes me wonder, why not have 
> multiple module ctors/dtors in the same file?  I tend to use them as a 
> convenient way to execute starttime code.  It could be advantageous to 
> be able to place pieces starttime code next to logically related runtime 
> code, instead of lumping it all together at the top of the file or some 
> such.

No reason not to.  Multiple unittests are already allowed.


Sean



More information about the Digitalmars-d mailing list