• words_number@programming.dev
    link
    fedilink
    arrow-up
    37
    arrow-down
    11
    ·
    10 months ago

    JS is horse shit. Instead of trying to improve it or using that high level scripting language as a compilation target (wtf?!), we should deprecate it entirely and put all efforts into web assembly.

    • Alien Nathan Edward@lemm.ee
      link
      fedilink
      arrow-up
      9
      arrow-down
      1
      ·
      10 months ago

      Idk anything about web assembly but I 100% agree that JS is absurd and feels like it was created in a weekend by some schmuck who just wanted to be able to edit html on the fly because it was.

    • LufyCZ@lemmy.world
      link
      fedilink
      arrow-up
      6
      ·
      10 months ago

      Why exactly is it horse shit? It does have it’s quirks but I wouldn’t go that far

      • SpaceCowboy@lemmy.ca
        link
        fedilink
        arrow-up
        2
        ·
        10 months ago

        I think it suffers from the same problem as SQL. A bunch organizations and companies would need to agree to make improvements, you don’t want to break compatibility, so nothing really improves. You just get some extensions to it here and there which just makes it messier.

        • LufyCZ@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          10 months ago

          Isn’t the “extension” problem the same with almost all programming languages?

          For example, does 80s C compile under gcc with 2015 features? If it does, then it’s no better than JS.

          • SpaceCowboy@lemmy.ca
            link
            fedilink
            arrow-up
            1
            ·
            10 months ago

            Yeah but with JS, you have to consider the browsers that are out there already. I think this is getting better now that IE is killed off, but there’s still a consideration about whether to use a new feature that doesn’t work on older browsers.

            With C, it’s compiled so if you’re distributing the binary, you’re done. And if you’re sharing the source to another developer, that dev will be likely to be technically proficient enough to update gcc and any needed libraries to the right version to get it to compile.

            When it’s an interpreted language that is interpreted by browsers made by different companies and organizations (so they have to agree on changes), with users not being reliable of keeping their browsers up to date, it’s going to be messy. Also there’s security concerns, you need to make sure when implementing the extension it won’t allow bad actors to make scripts to take over the users computer.

            It’s not anyone’s fault, it’s just a significantly more difficult problem to extend a language that is going to be sent to user’s computer on the fly from arbitrary websites and have those extensions be reliable, secure, and consistent across the various companies implementing it.