• Knusper@feddit.de
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        You can have frameworks which fully generate the JS DOM code for you, allowing you to write complete single-page applications without writing a single line of JS.

        • float@feddit.de
          link
          fedilink
          arrow-up
          0
          ·
          1 year ago

          I’m using the leptos framework (Rust) and really like it so far. Not a single line of JS, not even npm as a dependency in that project.

          • Knusper@feddit.de
            link
            fedilink
            arrow-up
            0
            ·
            1 year ago

            Yep, that’s the framework, I’m using, too. But most frameworks in the Rust ecosystem can do DOM interop, as the heavy lifting for that is provided by the wasm-bindgen library.

  • jpeps@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    What Typescript drama is there? It’s fantastic. It’s been an industry standard for years. In my anecdotal experience the only people that hate it are juniors who did pure JS at their bootcamp and seniors that have refused to learn anything for the last 5 years.

      • jpeps@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        I can understand that. Does it’s open source status not change anything for you?

        • Knusper@feddit.de
          link
          fedilink
          arrow-up
          0
          ·
          1 year ago

          If it’s dumped under an open-source license, but still developed exclusively by one corporation, they can swap out that license pretty easily.

          • jpeps@lemmy.world
            link
            fedilink
            arrow-up
            0
            ·
            1 year ago

            For what? If they took it away, the source code would still be there if someone wanted to fork it. Not to mention removing TypeScript from an application is relatively trivial.

            • Knusper@feddit.de
              link
              fedilink
              arrow-up
              0
              ·
              1 year ago

              They’re not that dumb, to just pull it completely. That would obviously result in a successful fork.

              Companies usually start with e.g. the BUSL, so source-available but proprietary restrictions.
              For TypeScript/Microsoft, I could imagine some variation of their EEE playbook.

              But really, the whole point of avoiding Microsoft et al, is that I don’t want to think about, how they could fuck this whole thing up. They’ve proven quite creative in this regard for as long as they’ve existed.

      • Knusper@feddit.de
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        No, but GUI frameworks can generate it for you. Same goes for DOM access, for which there’s normally only a JavaScript API.

        So, you’ll likely want to read JS, when researching what events or properties you can read/write for certain HTML nodes in the DOM, but with a mature GUI framework, you should not need to write any JS.

  • tram1@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    I’m kind of a beginner… Can someone explain why you would make/use/have a dynamically and/or weak typed language? Is it just to not write some toInteger / as u64 / try_from()? I mean the drawbacks seem to outweigh the benefits…

    • Knusper@feddit.de
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      They used to be more attractive around the 2000s, before type inference became commonplace and when IDEs/editors were still a lot less powerful.

      As for making a dynamically typed language, to my knowledge, they are actually easier to create than statically typed languages…