Re: How to name variables in a program?
- From: "Arthur J. O'Dwyer" <ajo@xxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 30 May 2005 14:45:13 -0400 (EDT)
On Sun, 29 May 2005, Phlip wrote:
namespace db { ... class pop3 { ... msg->getHdr(); } }
Now we need to type db and pop3 less often, so we can safely make them longer. Similarily, the line with msg->getHdr() is now shorter, so we have room to make it longer:
namespace eMailDatabase { ... class PostOfficeProtocolThree { ... pMessage->getHeader(); } }
I assume you were just casting about for a way to make Paul's 'pop3'
longer, but surely you know that 'PostOfficeProtocolThree' is a horrible
name for a class! Rather than obfuscating the fact that the class has
something to do with POP3 (not "Post Office Protocol Three"), it would
be better to use a /more/ descriptive name, preferably a noun such as 'POP3Interface' or 'POP3MessageInfo'.
[Paul wrote:]
The other advantage of my scheme is that when you ASCII sort the symbols, they make some sort of sense and look fairly organized anyways.
;-) Wouldn't they look even more organized if you named them alphabetically starting at 'aa' and going up toward 'zz'? (If you plan
to have more than 676 object classes in your program, the natural
extension to 'aaa'--'zzz' applies.) Point is, /looking/ organized
and actually /being/ organized are two different things.
-Arthur .
- Follow-Ups:
- Re: How to name variables in a program?
- From: websnarf
- Re: How to name variables in a program?
- References:
- How to name variables in a program?
- From: SerGioGio
- Re: How to name variables in a program?
- From: websnarf
- Re: How to name variables in a program?
- From: Alf P. Steinbach
- Re: How to name variables in a program?
- From: spinoza1111
- Re: How to name variables in a program?
- From: Jens . Toerring
- Re: How to name variables in a program?
- From: websnarf
- Re: How to name variables in a program?
- From: Phlip
- How to name variables in a program?
- Prev by Date: Re: How to name variables in a program?
- Next by Date: Re: How to name variables in a program?
- Previous by thread: Re: How to name variables in a program?
- Next by thread: Re: How to name variables in a program?
- Index(es):