why ; ?

Nick Sabalausky a at a.a
Fri May 9 10:40:01 PDT 2008


"bearophile" <bearophileHUGS at lycos.com> wrote in message 
news:g01trc$27bs$1 at digitalmars.com...
> Don:
>> But my experience
>> with PHP is that absence of declarations is the number 1 source of bugs
>> in that language. And it manifests itself as an initialization problem
>> -- I DID initialise that variable, but because of a typo, I find that
>> it's unexpectedly zero!
>
> I think here there's a difference between Python and PHP, Python creates 
> variables only when you write them, not when you read them.
>

That's certainly an improvement, and does reduce the number of problems, but 
the problem is still there:

Quoted from 
http://mail.python.org/pipermail/python-list/2005-January/304959.html

> epsilon=0
> S=0
> while epsilon<10:
>   S=S+epsilon
>   epselon=epsilon+1
> print S
>
> It will print zero, and it is not easy to find such a bug!
>





More information about the Digitalmars-d mailing list