std.stringbuffer

Steven Schveighoffer schveiguy at yahoo.com
Wed Apr 30 12:47:15 PDT 2008


"Sean Kelly" wrote
> == Quote from Steven Schveighoffer
>> "Bill Baxter" wrote
>> > Janice Caron wrote:
>> >> 2008/4/30 Me Here :
>> >>>> "std.string" is a module, so it can't also be a package. That's a
>> >>>> limitation of the D language.
>> >>>  Now. This is where you show me up to be nothing but a pretender in 
>> >>> this
>> >>> forum.
>> >>>  I have no idea what the distinction is be tween thos two in D.
>> >>
>> >> One is file, the other is a folder. std.string is a file, so it can't
>> >> also be a folder.
>> >>
>> >
>> > Herein lies the genius in Tango's naming conventions.  You *can* have 
>> > both
>> > a package std.string, and a module named std.String.  If you 
>> > consistently
>> > use different case for package and module names, then you can have your
>> > cake and eat it too.
>> Not on Windoze :)
>
> It should still work, I believe.  The source file will have a .d extension 
> and the folder
> won't, so there shouldn't be a filesystem collision.  Or are you saying 
> that the
> compiler does some checking behind the scenes anyway?  I'll admit I've 
> never
> actually tried this.

Excellent point, I completely forgot that even though you import std.String, 
you are really looking at the file
std/String.d.

In that case, I think you are right, it would work on Windoze.

-Steve 





More information about the Digitalmars-d mailing list