MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/tejbc/javascript_the_good_parts/c4lyye1/?context=9999
r/programming • u/sheldonpooper • May 09 '12
159 comments sorted by
View all comments
21
Old, and wouldn't this be true of every language?
9 u/yogthos May 09 '12 There is the principle of least astonishment, and JavaScript is one of the worst languages in that regard. 4 u/[deleted] May 09 '12 In what way? 3 u/fnord123 May 09 '12 edited May 09 '12 [] === [] and friends. There's a video kicking about with this shit.edit: https://www.destroyallsoftware.com/talks/wat -10 u/[deleted] May 09 '12 I have never done that, so it's a non-issue.In chrome I also get false, so it's not even correct. 16 u/fnord123 May 09 '12 "I've never done that so its fine for me." Words to live by. 1 u/[deleted] May 09 '12 edited May 09 '12 What i should have said is that I have never seen anyone do that in any language, in my code or anyone else's, over the last 10 years.His example isn't even correct, and doesn't work. it works as expected. 1 u/julesjacobs May 09 '12 You've never compared two lists? 1 u/[deleted] May 09 '12 Not with empty array literals, no. 1 u/julesjacobs May 09 '12 ...Have you ever had an empty array in a variable? Have you ever compared variables that contain arrays?
9
There is the principle of least astonishment, and JavaScript is one of the worst languages in that regard.
4 u/[deleted] May 09 '12 In what way? 3 u/fnord123 May 09 '12 edited May 09 '12 [] === [] and friends. There's a video kicking about with this shit.edit: https://www.destroyallsoftware.com/talks/wat -10 u/[deleted] May 09 '12 I have never done that, so it's a non-issue.In chrome I also get false, so it's not even correct. 16 u/fnord123 May 09 '12 "I've never done that so its fine for me." Words to live by. 1 u/[deleted] May 09 '12 edited May 09 '12 What i should have said is that I have never seen anyone do that in any language, in my code or anyone else's, over the last 10 years.His example isn't even correct, and doesn't work. it works as expected. 1 u/julesjacobs May 09 '12 You've never compared two lists? 1 u/[deleted] May 09 '12 Not with empty array literals, no. 1 u/julesjacobs May 09 '12 ...Have you ever had an empty array in a variable? Have you ever compared variables that contain arrays?
4
In what way?
3 u/fnord123 May 09 '12 edited May 09 '12 [] === [] and friends. There's a video kicking about with this shit.edit: https://www.destroyallsoftware.com/talks/wat -10 u/[deleted] May 09 '12 I have never done that, so it's a non-issue.In chrome I also get false, so it's not even correct. 16 u/fnord123 May 09 '12 "I've never done that so its fine for me." Words to live by. 1 u/[deleted] May 09 '12 edited May 09 '12 What i should have said is that I have never seen anyone do that in any language, in my code or anyone else's, over the last 10 years.His example isn't even correct, and doesn't work. it works as expected. 1 u/julesjacobs May 09 '12 You've never compared two lists? 1 u/[deleted] May 09 '12 Not with empty array literals, no. 1 u/julesjacobs May 09 '12 ...Have you ever had an empty array in a variable? Have you ever compared variables that contain arrays?
3
[] === [] and friends. There's a video kicking about with this shit.
edit: https://www.destroyallsoftware.com/talks/wat
-10 u/[deleted] May 09 '12 I have never done that, so it's a non-issue.In chrome I also get false, so it's not even correct. 16 u/fnord123 May 09 '12 "I've never done that so its fine for me." Words to live by. 1 u/[deleted] May 09 '12 edited May 09 '12 What i should have said is that I have never seen anyone do that in any language, in my code or anyone else's, over the last 10 years.His example isn't even correct, and doesn't work. it works as expected. 1 u/julesjacobs May 09 '12 You've never compared two lists? 1 u/[deleted] May 09 '12 Not with empty array literals, no. 1 u/julesjacobs May 09 '12 ...Have you ever had an empty array in a variable? Have you ever compared variables that contain arrays?
-10
I have never done that, so it's a non-issue.
In chrome I also get false, so it's not even correct.
16 u/fnord123 May 09 '12 "I've never done that so its fine for me." Words to live by. 1 u/[deleted] May 09 '12 edited May 09 '12 What i should have said is that I have never seen anyone do that in any language, in my code or anyone else's, over the last 10 years.His example isn't even correct, and doesn't work. it works as expected. 1 u/julesjacobs May 09 '12 You've never compared two lists? 1 u/[deleted] May 09 '12 Not with empty array literals, no. 1 u/julesjacobs May 09 '12 ...Have you ever had an empty array in a variable? Have you ever compared variables that contain arrays?
16
"I've never done that so its fine for me." Words to live by.
1 u/[deleted] May 09 '12 edited May 09 '12 What i should have said is that I have never seen anyone do that in any language, in my code or anyone else's, over the last 10 years.His example isn't even correct, and doesn't work. it works as expected. 1 u/julesjacobs May 09 '12 You've never compared two lists? 1 u/[deleted] May 09 '12 Not with empty array literals, no. 1 u/julesjacobs May 09 '12 ...Have you ever had an empty array in a variable? Have you ever compared variables that contain arrays?
1
What i should have said is that I have never seen anyone do that in any language, in my code or anyone else's, over the last 10 years.
His example isn't even correct, and doesn't work. it works as expected.
1 u/julesjacobs May 09 '12 You've never compared two lists? 1 u/[deleted] May 09 '12 Not with empty array literals, no. 1 u/julesjacobs May 09 '12 ...Have you ever had an empty array in a variable? Have you ever compared variables that contain arrays?
You've never compared two lists?
1 u/[deleted] May 09 '12 Not with empty array literals, no. 1 u/julesjacobs May 09 '12 ...Have you ever had an empty array in a variable? Have you ever compared variables that contain arrays?
Not with empty array literals, no.
1 u/julesjacobs May 09 '12 ...Have you ever had an empty array in a variable? Have you ever compared variables that contain arrays?
...
Have you ever had an empty array in a variable? Have you ever compared variables that contain arrays?
21
u/[deleted] May 09 '12
Old, and wouldn't this be true of every language?