• z3bra@lemmy.sdf.org
    link
    fedilink
    arrow-up
    12
    arrow-down
    2
    ·
    1 year ago

    I’ve recently started writing JS recently, after writing C, go, shell and ruby for years.

    Ended up with this gem in my code:

    var total = +qty + +pool[0] - +pool[1];
    

    I hate it.

      • voxl@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        4
        ·
        edit-2
        1 year ago

        Haha hey it brings in the money! I’m almost exclusively doing devops now (terraform makes me drool) but I can fix your php, ruby, js, give me anything man, I’ll learn it.

        I just have no problems with the weirdness of js. I weirdly like it. Love receiving a comment on a PR “wtf why do you do it like this? This is much easier: something_i_already_tried”.

  • DarkenLM@artemis.camp
    link
    fedilink
    arrow-up
    7
    ·
    1 year ago

    Anything is a nail if you hammer it hard enough.

    Though modern JS is way better than what it was before, and in my opinion is evolving in a good direction. It also pays my bills, so I couldn’t complain even if I wanted.

    • FrostySpectacles@lemmy.ml
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      The SvelteKit + TypeScript combo is such a breeze to work with!

      And compared to other languages, JavaScript scores pretty well in performance benchmarks. It has a lot more going for it than people give it credit for.

    • ☆ Yσɠƚԋσʂ ☆@lemmy.mlOP
      link
      fedilink
      arrow-up
      7
      arrow-down
      10
      ·
      1 year ago

      It’s a slight improvement, but you’re still inheriting the whole Js ecosystem, tooling, and most of the quirks of Js. There are far better languages you can use on the server, so I really don’t understand the appeal of using a Js based backend.