renamepalooza time

spir denis.spir at gmail.com
Fri Jan 21 15:57:16 PST 2011


On 01/21/2011 10:46 PM, Tomek Sowiński wrote:
> So if not uppercase, what is the convention for constants then? And, to hair-split more, what is a constant to begin with? Would e.g. a big immutable configuration tree structure fall into that bucket? Or a logger object?

Very personal def: I give constant & variable about the same meaning as 
in math: something predefined, or conversely undefined, at design time 
(which implies in a compiled language also at compile-time).
	f : x --> k.x
k is a constant, x a variable. Same below:
	factor3 = 3;
	int triple (int x) {return factor3 * x;}
Thus, I consider "enum" and "static" (in some of its numerous senses) as 
constant qualifiers.

Denis
_________________
vita es estrany
spir.wikidot.com



More information about the Digitalmars-d mailing list