D naming style?

Jarrett Billingsley jarrett.billingsley at gmail.com
Fri Sep 4 19:53:53 PDT 2009


On Fri, Sep 4, 2009 at 10:14 PM, bearophile<bearophileHUGS at lycos.com> wrote:
> Jarrett Billingsley:
>> I'm consistently confused by D (and Java and C#) code that doesn't
>> indicate member names, especially when they're named really common
>> things that often conflict with local variables, like "len" or "src"
>> or such. Unless the type is small enough to fit on a single screen,
>> it's easy to forget the member names.
>
> I usually follow Python usage, and use this.fieldName. Is this bad practice in D?

It's not bad practice, but it's somewhat unusual for a C-style
language, and not enforced by the language, so it's more likely that
people won't follow it.



More information about the Digitalmars-d mailing list