MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/8srix1/thanks_brendan_for_giving_us_the_javascript/e12xe45/
r/ProgrammerHumor • u/[deleted] • Jun 21 '18
302 comments sorted by
View all comments
Show parent comment
8
What would a better design look like?
30 u/pomlife Jun 22 '18 === and ==== 7 u/ohforth Jun 22 '18 =#= and =::=:|= 5 u/Hatefiend Jun 22 '18 edited Jun 22 '18 Make == equivalent to === and remove ===. Like every other language. 6 u/BigBad_BigBad Jun 22 '18 Maybe we should also change everything else about JavaScript so it’s the exact same as C#. Problems solved! 🤷🏼♂️ 1 u/TigreDemon Jun 22 '18 I believe PHP does not do that as well ... (someone confirm? I'm lazy)(or was it Java where you use an equal() function) 1 u/xIcarus227 Jun 22 '18 PHP behaves just like JS in this regard.You could argue the two operators should be swapped around but that's just about it. I personally don't think it's poor design. 1 u/TigreDemon Jun 22 '18 I find it pretty helpful
30
=== and ====
7 u/ohforth Jun 22 '18 =#= and =::=:|=
7
=#= and =::=:|=
5
Make == equivalent to === and remove ===. Like every other language.
6 u/BigBad_BigBad Jun 22 '18 Maybe we should also change everything else about JavaScript so it’s the exact same as C#. Problems solved! 🤷🏼♂️ 1 u/TigreDemon Jun 22 '18 I believe PHP does not do that as well ... (someone confirm? I'm lazy)(or was it Java where you use an equal() function) 1 u/xIcarus227 Jun 22 '18 PHP behaves just like JS in this regard.You could argue the two operators should be swapped around but that's just about it. I personally don't think it's poor design. 1 u/TigreDemon Jun 22 '18 I find it pretty helpful
6
Maybe we should also change everything else about JavaScript so it’s the exact same as C#. Problems solved! 🤷🏼♂️
1
I believe PHP does not do that as well ... (someone confirm? I'm lazy)
(or was it Java where you use an equal() function)
1 u/xIcarus227 Jun 22 '18 PHP behaves just like JS in this regard.You could argue the two operators should be swapped around but that's just about it. I personally don't think it's poor design. 1 u/TigreDemon Jun 22 '18 I find it pretty helpful
PHP behaves just like JS in this regard.You could argue the two operators should be swapped around but that's just about it. I personally don't think it's poor design.
1 u/TigreDemon Jun 22 '18 I find it pretty helpful
I find it pretty helpful
View all comments
Show parent comment
8
u/BigBad_BigBad Jun 22 '18 edited Jun 22 '18
What would a better design look like?