[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [stellation-res] To what extent should literals be named?
|
On Tue, 2002-09-03 at 12:19, Dave Shields wrote:
> Current policy is to name literals rarely, and to hopefully write code
> so that the context in which a literal is used indicates what the
> literal is naming.
[...]
> My own view is to avoid naming literals except where there is good
> reason to do so, but I would like to hear what others have to say
> about this.
I tend to avoid constant literals. When they are necessary, I define
them at the top of the class/method that uses them.I like to notice at
first glance that some constants will be used somewhere in the code.
BTW, while I understand the reasons why Stellation code always declare
variables at the end of the class, I don't like it because I am used to
a mix of Pascal (define at top) and C++ (define as needed) declarations.
It's only a matter of personal taste, not an objection.
Regards,
Rodolfo
--
MAXPROGRAMS
IBM Business Partner
Microsoft MSDN Business Connection Partner
rmraya@xxxxxxxxxxxxxxx
http://www.maxprograms.com