Is D 0.163 D 1.0?

Derek derek at psyc.ward
Tue Jul 25 04:52:07 PDT 2006


On Tue, 25 Jul 2006 10:31:53 +0200, Don Clugston wrote:

 
> Nooooooooo!!!!
> Am I the only person who has hundreds of local variables called 'var'?
> (mostly variants in Win32 code).

LOL! You deserve the pain then for choosing such a lame identifier!
 
> A quick google search for 'var cpp' showed a million hits, a fair chunk 
> of them are local variables in C++ code. It's a very popular variable name.


Oh my Bob! Doesn't anyone go to programming 101 anymore? Why make life hard
for yourself by picking identifier names that are likely to clash with
keywords *and* that don't help code readers.

Rule#23: Dealing with Identifier Names.
[a] Ensure your identifiers are not valid English words.
[b] Ensure your identifiers either contain a mix of UPPER and
    lowercase characters or contain an underscore or both.
[c] Ensure your identifiers never contain digits.
[d] Ensure your identifiers have at least three (3) characters.
 - Exceptions -
 [e] Single character identifiers, which should always be lowercase.
 [f] Method names can be valid words, but must have mixed case.
 [g] Anything your supervisor signs off on.

-- 
Derek Parnell
Melbourne, Australia
"Down with mediocrity!"



More information about the Digitalmars-d mailing list