Re: ISO Studies of underscores vs MixedCase in Ada or C++
From: Jacob Sparre Andersen (sparre_at_crs4.it)
Date: 10/20/03
- Next message: Jacob Sparre Andersen: "Re: Spell-checking source code"
- Previous message: Peter van Merkerk: "Re: string literals"
- Maybe in reply to: Peter Ammon: "Re: ISO Studies of underscores vs MixedCase in Ada or C++"
- Next in thread: Wes Groleau: "Re: ISO Studies of underscores vs MixedCase in Ada or C++"
- Reply: Wes Groleau: "Re: ISO Studies of underscores vs MixedCase in Ada or C++"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 20 Oct 2003 09:40:53 +0200
James Dow Allen wrote:
> CamelMode, camel_mode, etc. are all quite *readable*;
It may be a matter of personal taste (haven't seen any actual studies),
but I prefer underscores between words, when I am no allowed to put
spaces there. In Ada I follow the style guide and use both underscores
and capitalisation.
> when using long
> names the important thing is to make them *writable*,
Try to count how often you _read_ and _write_ an identifier. I think
you might be surprised by the difference. Easy writing of the
identifers is not anywhere nearly as important as easy reading.
> Consistency is therefore the important thing.
It is.
> If you abbreviate words,
> abbreviate them as the first 4 (or whatever) letters, consistently.
I prefer the suggestion from the Ada style guide (IIRC) that you don't
abbreviate words, and that you only use acronyms from a limited
project-specific list.
> (I usually rewind a file with "lseek(fd, 0L, 0)" because I can't
> remember if 0 is SEEKSET or SEEK_SET.)
Very annoying with a standard library with an inconsistent naming of
identifiers.
One more point on the topic of consistent naming of identifiers. I find
the style with using different naming conventions for functions,
constants, variables, etc. very annoying. I _don't_ want to have to
worry if something is a function, constant or variable. Specially not
if it actually is an implementation dependent detail. So _please_ use
the same naming convention for all identifiers.
Jacob
-- "Any, sufficiently complicated, experiment is indistinguishable from magic."
- Next message: Jacob Sparre Andersen: "Re: Spell-checking source code"
- Previous message: Peter van Merkerk: "Re: string literals"
- Maybe in reply to: Peter Ammon: "Re: ISO Studies of underscores vs MixedCase in Ada or C++"
- Next in thread: Wes Groleau: "Re: ISO Studies of underscores vs MixedCase in Ada or C++"
- Reply: Wes Groleau: "Re: ISO Studies of underscores vs MixedCase in Ada or C++"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|