Cannot import module that has name of a package

Don Clugston dac at nospam.com.au
Fri Mar 23 03:23:02 PDT 2007


Hennrich Blöbaum wrote:
>> I get around this by using uppercase (or camel case) for module names.
>>
>> module test.Foo;
>>
>>  - and -
>>
>> module test.foo.Bar;
>>
>>
>> this is a violation of walters suggested style guide, and it will not 
>> compile on operating systems that force a single case.
Such as?

> But I happen to 
>> love the practice, as now I am able to reuse package names for module 
>> names.
> 
> Yes, I have seen this, but as style guide says, windows is sadly ignored.
It works fine on Windows. As long as D is case-sensitive, it will work 
even if the OS is case-insensitive. You just need a module statement so 
that D knows what the correct case-sensitive name is. And when creating 
the file, you need to use the correct capitalisation so that it will 
work on case-sensitive OSes.



More information about the Digitalmars-d mailing list