string vs String

Simen Kjaeraas simen.kjaras at gmail.com
Fri Dec 14 02:48:51 PST 2007


On Fri, 14 Dec 2007 10:14:40 +0100, Colin Huang <colin.hwong at gmail.com>  
wrote:

> Bill Baxter Wrote:
>
>> Colin Huang wrote:
>> > Janice Caron Wrote:
>> >
>> >> And do you suppose that this would cause no name clashes at all with
>> >> anyone's apps? I imagine it would cause /more/. Anyone who's ever  
>> made
>> >> a string class has probably called it "String". To me, the lower case
>> >> s not only ensures fewer name clashes, but also makes it "feel" like  
>> a
>> >> primitive type (which it sort of almost is - I mean it's just an
>> >> array, not actually a class or a struct).
>> >
>> > Agreed :)
>> >
>> > On an unrelated note, module names starting with uppercase letters  
>> (like those in Tango) have always turned me off -- feels too Java-ish  
>> to me :P (I remember reading somewhere in the forum that this is done  
>> for good reasons, though)
>>
>> Tango names _Packages_ with with capitalized words, but not the modules.
>>   This allows you to have a module that's the same name as a package.
>> Like "String.string".  "String" is a package/directory and "string.d" is
>> a file in that directory.
>>
>> --bb
>
> Perhaps I'm misunderstanding here, but have a look at the following code
> from tango-bin-win32-CURRENT-dmd.1.022 (in file  
> \import\tango\text\String.d):
>
> module tango.text.String;
>
> Isn't this a module with a capitalized name? I'm confused ...

Seems Bill was just mixing things up. From a quick look at my Tango  
installation, it seems packages are lowercase, modules are capitalized.



More information about the Digitalmars-d mailing list