• termaxima@slrpnk.net
    link
    fedilink
    arrow-up
    28
    arrow-down
    4
    ·
    2 days ago

    JavaScript really depends on the people writing it restricting themselves to a sane (ish) subset, just like C++

    My personal gripe with JavaScript is how horribly slow it is. C++ at least has the merit of being fast once compiled. I wouldn’t feel great contributing to a JS project knowing fully well that a rewrite in a faster language would be 10x as effective as anything I could improve as is.

    • moseschrute@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      13 hours ago

      That’s funny because I - having not written much C++ - have an irrational hate of the language. But I like JavaScript. I think I need to look at C++ through the same lens I look at JS through.

      Imo you can write pretty performant websites in JS. I guess it depends what you’re doing, but e.g. if you pay attention to you’re rerenders in React, you’re gonna have a much better time.

      But I also totally understand as soon as you wanna do some compex stuff, JavaScript is not a good time. I don’t think webassembly has worked as smoothly as promised, but in theory, that should let you bring some C++ into the browser.