a style question

Dan Bernstein brnstnd at kramden.acf.nyu.edu
Thu Oct 4 14:03:10 AEST 1990


In article <Oct.3.22.06.40.1990.21194 at math.rutgers.edu> bumby at math.rutgers.edu (Richard Bumby) writes:
> Most mathematical
> exposition would benefit from free use of words, rather than letters,
> as primitive symbols.

You're free to use short names, like sin, cos, or foo, without confusing
anybody. But Peter's point is correct: using more than one letter for a
local index hurts readability, just as it's hard to read a book in
48-point type.

> The curious feature was that the loop and local declaration
> of i were made into a block.  This had the advantages of emphasizing
> the limited scope of the index variable and putting the declaration in
> the most natural (?) place, but the disadvantage of introducing an
> extra level of structure into the program.

I use this ``curious'' technique when I see a very strong procedural
orientation within the main body of a program, but not enough to warrant
separate procedures. Wtf is the disadvantage of introducing structure
into a program?

---Dan



More information about the Comp.lang.c mailing list