why
Walter Bright
newshound at digitalmars.com
Tue Jul 4 19:55:44 PDT 2006
John Reimer wrote:
> 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).
It's a convention. But one will run into difficulty if doing things like
naming one module "foo" and another module "Foo".
> 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.
The convention will work with both case sensitive and case insensitive
file systems. I don't foresee any other convention ever being used, but
even if one is, I expect it can be dealt with.
> 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.
That's true, but you still can't have a "Foo" and "foo" coexist.
> 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. :)
It's been a while since I've used VMS, but it was also case insensitive.
So was OS/2. DOS, VMS, Windows, and OS/2 all trace back to DEC operating
systems which were case insensitive. Linux, etc., all trace back to Unix
which was case sensitive.
More information about the Digitalmars-d
mailing list