Case sensitivity when linking

Lewis via Digitalmars-d digitalmars-d at puremagic.com
Sun Jan 29 18:52:12 PST 2017


On Monday, 30 January 2017 at 01:56:16 UTC, Walter Bright wrote:
> On 1/29/2017 5:50 PM, Lewis wrote:
>> I agree that's a good general practice. Even so, I'm curious 
>> if there are any
>> reasons against the compiler catching an error like this. 
>> Seems like it'd only
>> prevent errors.
>
> Because some people want to use mixed case in their imports. 
> It's not necessarily an error.

To clarify, I agree that the existence of mixed case is not an 
error (ie having a file called MyFile.d which I import via 
"import MyFile;" should not be an error). What I'm pondering is 
the case where I then try to import that same file via "import 
Myfile;".

If the latter is indeed not considered an error, then should 
optlink perhaps be case-insensitive by default? Otherwise it's 
almost useless to have the compiler accept this, since the linker 
will just reject it (unless the linker flag is set, which I 
suspect the majority of users won't have set). Or am I 
misunderstanding?


More information about the Digitalmars-d mailing list