• Pxtl
    link
    fedilink
    English
    arrow-up
    105
    arrow-down
    2
    ·
    7 months ago

    The fact that this meme makes sense to anyone demonstrates how dynamic typed programming languages cause brain damage.

    • atyaz@reddthat.com
      link
      fedilink
      arrow-up
      8
      arrow-down
      41
      ·
      7 months ago

      I prefer to think of it as maybe don’t shoehorn a shitty type checker into a dynamic language. Honestly I think people who get excited about typescript should fuck off and go write java instead.

      • Pxtl
        link
        fedilink
        English
        arrow-up
        37
        arrow-down
        3
        ·
        edit-2
        7 months ago

        JS is the one that’s built into the browser. If JS wasn’t built into the browser, it would go onto the trashbin of bad old languages that only survived because of their platform like VBA and ActionScript and .bat batch scripting. You can’t compare JS to any other language because JS is the one you don’t get a choice on.

          • jubilationtcornpone@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            6
            ·
            7 months ago

            I’ve heard it said that the longer you work with JavaScript, the more you hate it. I’m not gonna lie, I really miss working on ASP.Net Core backends. Switching from that to NodeJS was a huge downgrade.

        • atyaz@reddthat.com
          link
          fedilink
          arrow-up
          3
          arrow-down
          3
          ·
          7 months ago

          Fine but whatever you think about js, dynamic languages have certain advantages, and trying to turn it into another java or c# is a stupid endeavor. You’re not “fixing” javascript by making it more like java.

      • The type checker is actually pretty smart and can handle a lot of weird use cases, especially in strict mode (if you mark everything as Any type, that’s on you). The fact that the underlying language is very dynamic can be both good and bad. It’s good because you can be flexible when you need to be, but it also won’t prevent you from writing really shitty code, which lends it its reputation.

        I don’t know if you’ve ever tried writing frontends in Java, but it is terrible, especially if you want to make dynamic and accessible UIs. You don’t use a power drill when you need to hammer a nail.

        • atyaz@reddthat.com
          link
          fedilink
          arrow-up
          4
          arrow-down
          14
          ·
          7 months ago

          My comment was obviously devoid of any nuance, I am on programmer humor after all. I actually do use typescript, but I think fixing issues in application code that isn’t used by other code is a waste of time. I also think there are lots of advantages of a very dynamic language, like usable REPLs and much easier debugging. We can take these advantages way further by embracing the dynamic nature of javascript, like how lisps do it for example. But instead, everyone is happy going down the route of turning it into another c# (nothing against c# but we don’t need all languages to be c# and java).

      • Tau@sopuli.xyz
        link
        fedilink
        arrow-up
        7
        ·
        edit-2
        7 months ago

        That’s what WASM is for, but it’s not there yet :(

        And you still have to use js for hooks and stuff