9

What the fuck is so bad about JavaScript??? Like really. Everyone hates it but why? Developers HEAR JavaScript mentioned and immediately throw shit. Why?? JS is my go-to.

Comments
  • 14
    It's quirky, devs who enjoy type safety don't like quirks... yet the same bunch build frameworks for it with even more quirks.ðŸĪ·‍♂ïļ
  • 11
    To secure a false sense of elitism. Javascript has its quirks, but then again most languages do. I fucking love Javascript and ain't taking shit from people on it. 3 langs have made me wealthy enough to live a comfortable life: php, java and js. And i ain't about to change that shit because some basement dweller thinks that it ain't a good language. Fuck the haters and code in whatever stack you want my man.
  • 7
    yeah... about that (stolen from @thecode)
  • 7
    @Parzi about that, why are you adding/subtracting strings for?
  • 3
    @C0D4 it's an example showing that types in JS are entirely governed by PRNG at access time
  • 5
    @Parzi you do realize lots of languages have this kind of thing? you can't expect much with string to number, think of Haskell where you can LITERALLY redefine basic math
  • 2
    @luphoria yeah but like

    just use python if you want typing that makes sense more than 30% of the time
  • 5
    @Parzi I know, but show me an actual use case beyond a script kiddie who would do this.

    A number is a number, a string is a string.

    Just because it works one way, doesn't mean this horrible implementation should or ever will the other way, And as such the assumption should be made it shouldn't work in the first place - but common sense isn't that common anymore either.

    Plus good luck convincing the community to remove it, since it's bound to be in a tonne of javascript code out their in the wild since people would do it anyway.

    Also, name the perfect language with ZERO quirks, just 1.
    I'll go get a coffee while I wait.
  • 2
    @C0D4 "A language sucks more ass than most? Find me a perfect one." You say you know Java? Name all of their albums.

    It was an example, as well. Python likes to miss if statements entirely, I had an entire rant on it iirc.

    also if i wanna do "7"*324 in Python that bitch ends up with 374 7s in a string. That makes at least some sense.

    do you are have smooth retard brain
  • 1
    @luphoria I don't have Haskell experience, I just found out it was a language.
  • 6
    @Parzi I'm starting to get confused, you like python which is on the same level of pain in the ass as JS yet have no issue with multiplying a string and getting the same string n times.

    Which leads us back to the original problem, "you" are using strings inappropriately and blaming the language for it.
  • 0
    @C0D4 Again, it was an example. I can't do "11"-1 and get fucking 10, I get yelled at instead. Typin in Python is just stricter so you gotta put an int() on that shit first. And no, Python isn't flawless, but atl i'm not getting weird type interactions that make no goddamn sense. If I multiply something, I prolly want that many, so that makes sense in some way. I've actually used that instead of typing out a massive string for like UI and shit. It comes in handy sometimes. That's, however, one interaction that's specifically handled in a separate way from the actual math libs (iirc) as it has an actual use.
  • 1
    @M1sf3t imagine working with someone else on code
    (all jokes aside i'm aware, I only do that kind of thing when it's not gonna be used for shit aside from stupid shit I do.)

    Also JS is a well-documented pain in the ass, i'm merely stating that types are a bitch pretty often in it.

    why am i being yelled at from like 3 directions damn
  • 2
    @Parzi I'm just trying to understand why you would do it, instead of showing me more examples of it being done.

    😂

    It's almost like your the only 1 defending this shit, but at the same time, against it too.
  • 2
    I don't dislike JavaScript per se, I just don't think it belongs to backend. It's a language originally intended to dynamically adjust websites in browsers.

    That being said, PHP was supposed to only be a templating language for HTML.
  • 1
    @C0D4 It's smaller and (to me) feels better to do "="*128 instead of including 128 = chars in one massive string to print a CLI to screen. However, "11"-1 being 10 is garbage. I'm not saying "do it but don't," i'm saying it's okay to use multiplication to, say, duplicate something many times, but full-on cross-type math (not counting int/float pairings) is just fucking retarded. I might wanna concatenate a string with a number, I don't wanna fucking add the int to the string and end up with an int.
    @kescherRant yeah I'm not touching PHP, nor can you make me.
    @M1sf3t A lot of the time a simple webpage is bloated to fuck just because of node_modules. I've had to help my dad with that issue, actually: he had a site totalling 13MB (that includes pictures) that ate over 500MB of upload bandwidth and over 3 minutes of 100% CPU time usage per page view thanks to node shit. That's not taking any of the rest of the site into account, either, but that was pretty much every page thanks to node.
  • 1
    Holy fuck, I ran out of characters.

    Anyways.

    @M1sf3t We scrapped it entirely and moved to Wordpress, which helped immensely.
  • 1
    I really wonder why this "11"-1 example is the only one really mentioned when you can do so much stupid things, like manipulating prototype methods of inbuilt types.
    Don't get me wrong, I really like JS but there is a reason why so much bad code is around in this language.
  • 4
    "JS is my go-to"

    well, there's one example of what's horrible about it.
  • 3
    @Parzi no, just by casting rules and operators.

    Casting to string has higher priority than casting to int, but subtraction does not work on string so it enforces an int cast while plus can be both addition and concatenation, and concat works on strings.

    Yes, this is a bit odd but if you avoid depending on implicit cast and use explicit you get very few surprises ;)

    And JS is probably the only language so far to compete with java for running everywhere :P

    At least so far among the popular.

    And javas tour in the browser is on hold until you have webassembly support for it.
  • 1
    Wanna build website(s)? Then use it, otherwise, you got plenty of options. And dafuq is web assembly 😒
  • 2
    @volttide c/c++ being used for web (sorta like node), except you still need to use JS to interact with it which kinda defunks the purpose.

    https://webassembly.org/
  • 1
    @Parzi sorry to have to say that, but if your Website has 15MB and moving to WordPress actually makes it BETTER, then that's clearly a layer 8 problem. If someone thinks its a good idea to FTP their node_modules, that's what npm install is for ðŸĪŠ
  • 1
    @C0D4 I used django/flask sometimes for backend, but when it got to dom manipulation, yup I still need to use the js things.
  • 3
    "There are only two kinds of languages: the ones people complain about and the ones nobody uses." Bjarne Stroustrup
  • 0
    @M1sf3t it was my dad's website that he ran at home. He used a website builder that didn't use Wordpress shit, idr which one.

    alao @eval
  • 1
    @Demolishun that's due to popularity, yes, as if no one uses it, the flaws haven't been found yet. Not all of them are perfect, some are just more shit than others
  • 1
Add Comment