why

John Reimer terminal.node at gmail.com
Sun Jul 2 19:13:51 PDT 2006


Derek Parnell wrote:

> 
> This is a quote from the D documentation on modules ...
> 
> "By convention, package and module names are all lower case. This is
> because those names have a one-to-one correspondence with the operating
> system's directory and file names, and many file systems are not case
> sensitive. All lower case package and module names will minimize problems
> moving projects between dissimilar file systems."
> 
> Good advice to heed.
> 

Well, it may be good advice, but I consider it impractical since it's 
not at all consistent with the D language itself (where case sensitivity 
is the norm within source files).  I think it's an ugly and limiting 
requirement (or convention).

The naming of namespaces should be parallel to any other D convention. 
If this is a problem, then mapping D namespaces to the filesystem was 
not such a good idea, because this makes D more dependent on OS 
filesystem technology and schemes.  That probably is not a future proof 
approach.

Furthermore, contrary to the statement Walter makes there, I don't know 
of many file systems that are truly case insensitive, at least 
pertaining to those OSes that D is available on currently: win32 is the 
closest that comes to that.  Even windows, though, allows files and 
directories to be named with uppercase and maintains the case state... 
Thus, as long as you remember to be consistent with filename casing, 
using uppercase in module names is not an issue on Windows.

I consider the residual case insensitivity in Win32 a defect and a nasty 
side effect of the DOS era.  If Windows is the only OS that makes 
keeping Walter's convention a "good idea", I'm not convinced. :)

-JJR



More information about the Digitalmars-d mailing list