From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Ada's identifiers casing considered ugly
Date: Tue, 16 Oct 2012 18:07:32 -0500
Date: 2012-10-16T18:07:32-05:00 [thread overview]
Message-ID: <k5kpbp$m75$1@munin.nbi.dk> (raw)
In-Reply-To: k28mt2$jnj$1@speranza.aioe.org
"Nasser M. Abbasi" <nma@12000.org> wrote in message
news:k28mt2$jnj$1@speranza.aioe.org...
...
> "I like underscore in names of variables. But I do not like
> at all the current Ada tradition of using Upper case for
> first letter as in
>
> This_Is_An_Identifier
>
> I find this ugly and hard on the eye to read.
I agree with this.
> ... I like
> all lower case for variable names, as it is easier to read. Less
> variation in texture and form
>
> this_is_an_identifier"
But I don't agree with this. This blends identifiers and reserved words into
an unreadable mess. (Maybe it's OK if you ONLY use colorizing editors and
never expect anyone else to use your code.)
RRS uses "title case" for identifiers, which means that we use the same
casing as you would if you wrote this as the title of something. For the
above, that gives:
This_is_an_Identifier
Our pretty printer can enforce this style directly (it has a list of words
that aren't capitalized).
I've also experimented with capitalizing just the first letter:
This_is_an_identifier
I definitely agree that capitalizing words like "Is" is ugly. I get in
trouble repeatedly working on the Ada Standard, because I naturally refuse
to type "_Is_" and thus a lot of identifiers end up in the "wrong" case.
Randy.
next prev parent reply other threads:[~2012-10-16 23:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-05 19:01 Ada's identifiers casing considered ugly Yannick Duchêne (Hibou57)
2012-09-05 19:15 ` Vinzent Hoefler
2012-09-05 19:23 ` Pascal Obry
2012-09-05 19:37 ` Vinzent Hoefler
2012-09-05 20:24 ` Shark8
2012-09-05 22:58 ` Anh Vo
2012-09-06 10:02 ` Georg Bauhaus
2012-09-05 21:07 ` Manuel Collado
2012-09-05 21:40 ` Vinzent Hoefler
2012-09-05 23:23 ` Nasser M. Abbasi
2012-10-16 23:07 ` Randy Brukardt [this message]
2012-09-07 9:59 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox