What Makes A Programming Language Good

Nick Sabalausky a at a.a
Wed Jan 19 11:24:46 PST 2011


"spir" <denis.spir at gmail.com> wrote in message 
news:mailman.710.1295434677.4748.digitalmars-d at puremagic.com...
> On 01/18/2011 07:10 PM, bearophile wrote:
>> spir:
>>
>>> The D styleguide requires on one hand capitalised names for types, and
>>> lowercase for filenames on the other. How are we supposed to make them
>>> match?
>>
>> Why do you want them to match?
>
> Because when a module defines a type Foo (or rather, it's what is 
> exported), I like it to be called Foo.d. A module called doFoo.d would 
> certainly mainly define a func doFoo. So, people directly know what's in 
> there (and this, from D's own [supposed] naming rules :-). Simple, no?
>

If I have a class Foo in it's own module, I call the module (and file) 
"foo". I find this to be simple too, because this way types are always 
capitalzed and modules are always non-captialized. Plus, like Vladimir 
indicated, this makes it a lot easier to distinguish between the type 
("Foo") and the module ("foo"). 




More information about the Digitalmars-d mailing list