I work in a team and have so done for the last 20+ years and never 
yet declared a variable with function level scope as const just to 
prevent some other person coming along later and changing the code 
value of the variable if they think it is needed.

...and if thats was the case why dont we see widespread use of this 
style within Adobe code...

If I need something like pi as a const I would declare a class member 
const for pi, not a function scoped const var.

But seems you guys program different from the way we do I guess,
  
--- In flexcoders@yahoogroups.com, "johantrax" <[EMAIL PROTECTED]> 
wrote:
>
> > unless you have a split personality.
> 
> Well... it might be you just provided the answer there. When working
> on a project having the size of Flex, you work in a team.
> Most probably a short function is indeed written by one person. But
> what guarantees that nobody else will one day pass by and alter your
> functions? In the case of shared work, defining that variable as a
> const is a much quicker way of telling others that it's a
> marker/whatever, than having to put comment out there, saying:
> //next is a variable
> //I pray to you and the lord to not change it
> // because it just holds some value I need to remember
> var pleaseDoNotChangeMe:Number = 3.1415...;
> // End of Prayer ;)
> 
> --Johan
>


Reply via email to