From: "Mr. Shawn H. Corey" <[EMAIL PROTECTED]>
> Ken Foskey wrote:
> > I always make that mistake 'if( $a = 10 ) {'  that is why I always 'use
> > warnings' and, most importantly, correct the code. Pet peeve is 'use
> > warnings' and then not cleaning them up.
> > 
> 
> That's because way back in grade school, you were taught that 'a = 10'
> (make a equal to ten) and 'a = 10' (a may be equal to ten) are the
> same thing.  Computers are stupid; you have to tell them the
> difference.  Not your fault; blame it on your teachers. 

I don't think so. There are "programming languages" that use the same 
operator (or rather the same syntax) for both and decide which one 
you wanted based on context. Thus restricting what you can do. And 
confusing their users.

Eg. in Visual Basic you write

 a = 10 ' Let a be equal to 10. Yeah, comments start with '. Silly.
 if a = 14 then ' If a happens to be equal to 14

and even

 bool = a = 10 ' Let bool be true if a happens to be 10 and false 
otherwise

(Why do I keep using "let" instead of saying "Set a to 10"? Well, 
because there is a Set statement and a Let statement and the equals 
are equivalent to the Let one. The difference between

  Set a = b
and
  Let a = b

is ... erm ... very well thought out. That is if you are crazy.)

Jenda
P.S.: Sorry, I felt like venting.
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to