declaration of variables?

laotseu bdesth at removethis.free.fr
Thu Feb 20 19:46:36 EST 2003


Mark Charsley wrote:
> In article <b2r14h02bfp at enews1.newsguy.com>, aleaxit at yahoo.com (Alex 
> Martelli) wrote:
> 
> 
>>Rather, consider a hypothetical language where I have to declare ALL
>>variables AND constants I'll be using later on:
>>
>>    variables x, y, z, y
>>    constants 23, 34, 45, 56
>>       ...
>>    x = 23
> 
> 
> According to _all_ coding standards I've ever seen, that's exactly what 
> one should do. Instead of littering ones code with magic numbers, one 
> should create manifest constants in one (and only one) location, and then 
> use the constants in one's code. 

I think you got it wrong... Alex was talking of having to declare 
*litteral* constants, not *symbolic* constants.

Have you ever heard of any language that require you to declare 
*litteral* constants ?-)


Laotseu





More information about the Python-list mailing list