Op 2005-02-05, Roy Smith schreef <[EMAIL PROTECTED]>:
> In article <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED] (Alexander 
>  Zatvornitskiy) wrote:
>
>> And, one more question: do you think code like this:
>> 
>> var S=0
>> var eps
>> 
>> for eps in xrange(10):
>>   S=S+ups
>> 
>> is very bad? Please explain your answer:)
>
> Let me answer that by way of counter-example.
>
> Yesterday I was writing a little perl script.  I always use "use strict" in 
> perl, which forces me to declare my variables.  Unfortunately, my code was 
> giving me the wrong answer, even though the interpreter wasn't giving me 
> any error messages.
>
> After a while of head-scratching, it turned out that I had written "$sum{x} 
> += $y" instead of "$sum{$x} += $y".  The need to declare variables didn't 
> find the problem.  I *still* needed to test my work.  Given that I needed 
> to write tests anyway, the crutch of having to declare my variables really 
> didn't do me any good.

I you come to the conclusion that it doesn't do you any good, why did
you use it? I find it odd that someone who prefers to use it in a
language where it is optional is argues that it shouldn't be included
as an option is an other language. I would think that if he thinks
it so bad he wouldn't use it in that other language in the first place.

-- 
Antoon Pardon
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to