D naming style?

Leandro Lucarella llucax at gmail.com
Sat Sep 5 09:52:26 PDT 2009


Jarrett Billingsley, el  4 de septiembre a las 22:53 me escribiste:
> 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.

Just as decorating members with '_' or 'm' =)

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
They love me like I was a brother
They protect me, listen to me
They dug me my very own garden
Gave me sunshine, made me happy

Nice dream, nice dream
Nice dream



More information about the Digitalmars-d mailing list