Bad naming convention

Andrew van der Stock ajv "at" greebo.net
Tue, 27 Feb 2001 11:40:36 +0000


In past projects, where C has been used, we've gone for C++ like constructs:

globals are prefixed such as

	gLog
	g_log

And struct elements are done like:

	mLog
	m_log

And local (stack) variables are done like:

	lVar
	l_var

I'd suggest reading Code Complete*, pp 196-213, ignoring the Hungarian
section even though Steve McConnell and I agree that it is awful. I am not
into all that Hungarian notation hooplah. The compiler should be type
checking for you, not the programmer blearly reading the variable name at 3
am with far too few coffees. One bad cast and it's all wasted anyway.

Andrew

* McConnell, Steve, _Code Complete_, Microsoft Press, ISBN 1-55615-484-4
---------------------------------------------------------------------
To unsubscribe, send a message with the line: unsubscribe vnc-list
to majordomo "at" uk.research.att.com
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------