Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: irritation makes perls

by Herkum (Parson)
on Sep 25, 2009 at 14:21 UTC ( #797518=note: print w/replies, xml ) Need Help??


in reply to irritation makes perls

Such as the fact that there are two sets of comparison operators

Would you rather do what all the other languages do, declare every variable as specific type( a string, a number, a null, or an object). I can live with two operators.

Using == with strings accounts for at least 90% of my mistakes

You must be use to another language, like Javascript. This is not a problem with Perl, but rather what you have become used to.

Replies are listed 'Best First'.
Re^2: irritation makes perls
by Anonymous Monk on Sep 25, 2009 at 21:17 UTC
    Turns out you shouldn't use == in javascript, JS doesn't have warnings/strict (although it will have strict in the future)
    '' == '0' // false 0 == '' // true 0 == '0' // true false == 'false' // false false == '0' // true false == undefined // false false == null // false null == undefined // true " \t\r\n " == 0 // true

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://797518]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2018-09-24 13:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Eventually, "covfefe" will come to mean:













    Results (191 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!