D modules/sourcecode organisation/filesystem mapping

Chad J gamerChad at _spamIsBad_gmail.com
Fri May 12 15:59:21 PDT 2006


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.



More information about the Digitalmars-d mailing list