From: Louis Tribble <letribble@msmail4.hac.com>
Subject: Re: Language Choice and Coding style
Date: 1996/06/21
Date: 1996-06-21T00:00:00+00:00 [thread overview]
Message-ID: <31CAD534.41C6@msmail4.hac.com> (raw)
In-Reply-To: nh3f3pppsl.fsf@paralysys
Nasser Abbasi wrote:
> I'd like to know why do C and C++ programmer
>
> pchWriteInThisStargeAndHardToReadWayLikeThis while the Ada
> programmers
>
> Write_In_Clear_And_Nice_Way_Like_This ??
Two thoughts, for what they're worth:
(1) Typing skills may be a factor for some people. I don't touch type
the top row as reliably as the other rows, so underscores slow me down
(nevertheless, I _do_ use them).
(2) In languages like C, naming conventions are often used to simulate
multiple visible name spaces (excuse the C, but the example fails in
Ada):
typedef struct Sequence_type Sequence;
extern void sequence_create (...
extern void sequence_insert (...
extern void sequence_remove (...
Since there is no scope separator like the . in Ada or the :: in C++,
the underscore gets pressed into service. If it is also used as the
word separator, an informal ambiguity is introduced:
typedef struct Sequence_Partial_type Sequence_Partial;
extern void sequence_partial_create (...
extern void sequence_partial_insert (...
extern void sequence_partial_remove (...
.
.
Sequence_Partial* dependents;
.
.
while (sequence_partial_length (dependents)) {
node = sequence_partial_remove (dependents);
node_destroy (node);
}
Avoiding the underscore as a word separator can help a (human) reader
automatically discard the prefix and focus on the "meaningful" part of
the name when the name appears in a context where the prefix is
obvious:
typedef struct SequencePartial_type SequencePartial;
extern void sequencepartial_create (...
extern void sequencepartial_insert (...
extern void sequencepartial_remove (...
.
.
SequencePartial* dependents;
.
.
while (sequencepartial_length (dependents)) {
node = sequencepartial_remove (dependents);
node_destroy (node);
}
Louis Tribble
letribble@msmail4.hac.com (until the mail scheme changes yet again...)
next prev parent reply other threads:[~1996-06-21 0:00 UTC|newest]
Thread overview: 84+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-06-21 0:00 Language Choice and Coding style Nasser Abbasi
1996-06-21 0:00 ` Giuliano Carlini
1996-06-21 0:00 ` David Weller
1996-06-21 0:00 ` Robert Dewar
1996-06-24 0:00 ` Dr. John B. Matthews
1996-06-21 0:00 ` The Amorphous Mass
1996-06-23 0:00 ` Robert Dewar
1996-06-27 0:00 ` The Amorphous Mass
1996-06-27 0:00 ` Adam Beneschan
1996-06-28 0:00 ` Peter Hermann
1996-06-28 0:00 ` John McCabe
1996-06-28 0:00 ` Robert Dewar
1996-07-02 0:00 ` John McCabe
1996-06-28 0:00 ` Robert A Duff
1996-06-29 0:00 ` Samuel Mize
1996-06-29 0:00 ` Robert Dewar
1996-07-04 0:00 ` Peter Hermann
1996-07-04 0:00 ` Robert Dewar
1996-07-05 0:00 ` software engineering and the notion of authorship Fergus Henderson
1996-07-08 0:00 ` Peter Hermann
1996-07-08 0:00 ` Jakob Engblom
1996-07-08 0:00 ` The Amorphous Mass
1996-07-08 0:00 ` Robert Dewar
1996-07-08 0:00 ` Fergus Henderson
1996-07-09 0:00 ` Richard A. O'Keefe
1996-07-09 0:00 ` Fergus Henderson
1996-07-11 0:00 ` Paul Eggert
1996-07-08 0:00 ` John Byerly
1996-07-15 0:00 ` Ralph Silverman
1996-07-15 0:00 ` Fergus Henderson
1996-07-17 0:00 ` Robert Dewar
1996-07-19 0:00 ` Mike Curtis
1996-07-05 0:00 ` Language Choice and Coding style John McCabe
1996-07-04 0:00 ` Dan Evens
1996-07-04 0:00 ` John McCabe
1996-07-02 0:00 ` John McCabe
1996-07-02 0:00 ` Samuel Mize
1996-07-03 0:00 ` John McCabe
1996-07-03 0:00 ` Jeff Dege
1996-07-03 0:00 ` Robert Dewar
1996-07-04 0:00 ` John McCabe
1996-07-04 0:00 ` Phil Howard
1996-07-04 0:00 ` Peter Hermann
1996-07-06 0:00 ` Laurent Guerby
1996-07-19 0:00 ` software engineering and the notion of authorship Andrew Gierth
1996-06-23 0:00 ` Language Choice and Coding style mfinney
1996-06-23 0:00 ` Robert Dewar
1996-06-26 0:00 ` mfinney
1996-06-21 0:00 ` Louis Tribble [this message]
1996-06-21 0:00 ` Jerry van Dijk
1996-06-24 0:00 ` Adam Beneschan
1996-06-21 0:00 ` David Emery
1996-06-23 0:00 ` Darin Johnson
[not found] ` <4qeu56$52r@news.interpath.net>
1996-06-23 0:00 ` Nasser Abbasi
1996-06-24 0:00 ` Michael R. Hartwig
1996-06-24 0:00 ` John McCabe
1996-06-24 0:00 ` Adam Beneschan
1996-06-24 0:00 ` Peter Hermann
1996-07-01 0:00 ` Alan Brain
1996-07-02 0:00 ` John McCabe
1996-06-26 0:00 ` Nasser Abbasi
1996-06-26 0:00 ` Ian Ward
1996-06-24 0:00 ` Theodore E. Dennison
1996-06-24 0:00 ` Andreas Schoter
1996-06-29 0:00 ` Rich Maggio
1996-06-29 0:00 ` Samuel Mize
1996-07-01 0:00 ` Richard A. O'Keefe
1996-07-02 0:00 ` Samuel Mize
1996-07-03 0:00 ` Robert Dewar
1996-07-08 0:00 ` ++ robin
[not found] ` <JSA.96Jun26141502@organon.com>
1996-07-01 0:00 ` Russel A Hill
1996-07-01 0:00 ` Robert Dewar
1996-07-08 0:00 ` Russel A Hill
1996-07-02 0:00 ` Richard A. O'Keefe
1996-07-02 0:00 ` Jon S Anthony
1996-07-03 0:00 ` Mark Eichin
1996-07-02 0:00 ` Nasser Abbasi
1996-07-03 0:00 ` steidl
1996-07-05 0:00 ` Samuel Mize
1996-07-06 0:00 ` N. L. Sizemore
1996-07-08 0:00 ` steidl
[not found] <835824850.11044.0@assen.demon.co.uk>
1996-06-27 0:00 ` Ian Ward
1996-06-27 0:00 ` John McCabe
-- strict thread matches above, loose matches on Subject: below --
1996-07-05 0:00 Robert C. Leif, Ph.D.
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox