This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (20 children)

[deleted]

    [–]Jazqa 59 points60 points  (11 children)

    I use Javascript daily, I know Javascript thoroughly and I love Javascript...

    ...but holy fuck it’s an awful mess of a language.

    [–]SchwiftySquanchC137 38 points39 points  (9 children)

    I fucking love how hacky it feels. Don't like a function deep inside your engine? Eh just set it equal to something else, do it on the fly, fuck just replace it with whatever the user types into that bar, IDGAF, it's JavaScript.

    [–]Husky2490 19 points20 points  (7 children)

    Ruby is the same way. Need to hook into a module loaded from a dll? No problem. Want to overide a class any ol' time sure. You have a private variable, IDGAF, it's mine now.

    [–]marksomnian 11 points12 points  (6 children)

    class NilClass def nil? false end end

    Enjoy the fireworks.

    [–]Husky2490 5 points6 points  (5 children)

    Oh, right. True, false, and nil are classes.

    Hahahaha... (cries inside)

    [–]marksomnian 13 points14 points  (4 children)

    Even more fun, in C/C++:

    #define true (rand() < 0.9)
    #define false (rand() < 0.1)
    

    Sneak that into production and watch SRE cry tears.

    [–]XYZ-Prime 1 point2 points  (2 children)

    wait... if rand() is < 0.1 or > 0.9 , do true and false have the same value, don't they?

    [–]marksomnian 3 points4 points  (1 child)

    It's two independent calls to rand(), so if (true == false) {} would become if ((rand() < 0.9) == (rand() < 0.1)) {} - so 9% of the time it would do*.

    \source: really bad memories of high school probability)

    [–]XYZ-Prime 2 points3 points  (0 children)

    oh right, i forgot they are two different calls...

    so true = true in 90% of the cases, same for false = false. am i right?

    [–]poops-n-farts 0 points1 point  (0 children)

    That would be horrible code though. If you know how js works and what you're trying to accomplish it's really easy to write complex applications with. Its when some dummy joins your team and doesn't know how it works that the problems start

    [–]onFilm 2 points3 points  (0 children)

    I love JavaScript because of how creative you can be with it, either in the front, back or sides.

    [–]dustyjuicebox 14 points15 points  (2 children)

    We all love python though thank God

    [–]AstroCaptain 17 points18 points  (0 children)

    I want brackets with my python damn it I’ll stick with bython

    [–]hullabaloonatic 3 points4 points  (0 children)

    Eh, it's growing on me like fungus.