Conrad's ALFS comments
Bill Maltby LFS Related
lfsbill at wlmcs.com
Mon Aug 26 17:49:36 PDT 2002
On Tue, 27 Aug 2002, Raphael Schmid wrote:
> > Good programming style suggests that names be longer, not shorter, so that
> > each name is self-explanatory. This eases learning for people new to the
> > scripts. Shorter names are preferred by folks like me, K & R traditional-
> > ists, who like to type less and are performance oriented on slower eqpt.
> I'm reading K&R's "The C Programming Language" (2nd edition) these days,
> and they encourage long style names that are easily understood!
I hope that they adapted as equipment and capability changed. In my only
copy, copyright 1978, (btw "...set in Times Roman and Courier 12 by the
authors using a Graphics Systems phototypesetter driven by a PDP-11/70
running..."), on page 33, "only the first 8 characters of an internal name
are significant, although more may be used". They go on to say that names
should be meaningful and not be easily confused. And that is all
that is said about the style of variable and function names. Throughout
the book are names all lower case and generally 8 characters or less.
However, it is/was common practice to use all upper case for macros.
> I for myself prefer to combine upper-lowercase naming style and underline
> style if sensible, like "input_getSomeShit" and "input_getSomeMoreShit"
> instead of "input_get_some_shit" and "input_get_some_more_shit". Being
> true to yourself, you should agree the former looks much cleaner and is
> more easily understood.
Both work for me. I tend to use the mixed case when I'm trying to avoid
running off the right edge of the screen and that lets me drop the
underscores. Generally, I prefer the underscore form so that macros of all
upper case really jump out when I'm scanning.
Of course, I did have one cranky individual bitch about the mixed case. It
turns out that he did not type well with that style.
> Just another small comment, and of course no coding-style advocacy. ;-)
> Unsubscribe: send email to listar at linuxfromscratch.org
> and put 'unsubscribe alfs-discuss' in the subject header of the message
billm at wlmcs.com
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe alfs-discuss' in the subject header of the message
More information about the alfs-discuss