Hello QNX World,
(I did a mental coin toss about where to post this question –
applications and .devtools lost.)
I would appreciate any pointers to books, online articles or other
references which discuss function and variable naming. I’m talking
about the various stylistic forms and use of upper and lower case for
readability (excluding the so-called Hungarian notation developed at
Microsoft).
I realize this ranks even lower than bracket/brace placement in the
trivia category. But I find myself thoughtlessly changing styles from
day to day like:
1: void mybigfatfunction(int varone, long vartwo);
2: void my_big_fat_functtion(int var_one, long var_two);
3: void MyBigFatFunction(int varOne, long varTwo);
4: void MyBigFatFunction(int VarOne, long VarTwo);
I’m thinking #2 is more readable than #1 but adds a lot of underscores
(so what?). #4 is very readable but #3 makes a style statement about
variables versus functions by capitalizing the first letter of the
latter.
Some (many) years ago there was a book on programming styles patterned
after the classic “Elements of Style” for English usage. Is there a
more modern version?
Thanks,
Bob Bottemiller
Stein.DSI/Redmond, WA USA