How do you name table/structure elements?
Paul Lew
lew at gsg.UUCP
Sat Jan 20 00:46:27 AEST 1990
sullivan at aqdata.uucp (Michael T. Sullivan) writes:
> plain descriptive table/structure descriptive
> ----------------- ---------------------------
> name cu_name
I would like to point this out: if you are going to us the 'plain descriptive'
approach, make sure you have a set of 'modern' tools to work with them. For
example, you can not simply do grep on 'name' because all the other 300 'name'
used in other structures will also be found. A lot of other tools will not
function nicely, to name a few: mkid/gid, cxref. People worked with Ada
before probably feel the same.
Put some burden on the programmers will always make life a lot easier. If
you are working with Unix and you have Saber C, you might be OK. This is not
true if you are cross compiling for MSDOS.
IMHO, I think put some 'smart' in the variable naming convention is a good
idea. The other one I like is to Capitalize all the global variables so
when you look at the code you 'know' what the implication will be...
--
Paul Lew (lew at gsg.gsg.com) UUCP: oliveb---+
uunet---samsung--+
General Systems Group, 5 Manor Parkway harvard--+--gsg--lew
Salem, NH 03079 (603) 893-1000 decvax---+
More information about the Comp.lang.c
mailing list