• @thedeadwalking4242
    link
    English
    2210 hours ago

    Please please please can we just use type safe languages.

    • @[email protected]
      link
      fedilink
      English
      310 hours ago

      Agreed. Just the idea of finally replacing JS with something only to be another of those “dynamic” languages makes me want to puke.

      • @[email protected]
        link
        fedilink
        English
        39 hours ago

        Asking genuinely as someone who knows not much about this subject, is typescript not already an option? Isn’t it just type safe js that gets interpreted as js?

        • @SandLight
          link
          English
          5
          edit-2
          8 hours ago

          Typescript doesn’t run in browser. It gets translated to js by some build steps. I would also say it’s only mostly type safe. You can kind of trick the system if you don’t know what you’re doing or don’t like your coworkers.

          • @[email protected]
            link
            fedilink
            English
            18 hours ago

            No, you can’t if there’s any semblance of a PR review process. Reject until it’s type safe.

  • @[email protected]
    link
    fedilink
    English
    68 hours ago

    This isn’t about replacing javascript, this compiles something that looks a bit like Python to C and then to WASM. Which browsers can run natively these days. But you can do that with any source language if there’s a compiler for it, type safe or not. You can compile Rust to WASM too for example. So nothing’s getting replaced, these are just additional tools for Web developers.

  • @rockSlayer
    link
    English
    211 hours ago

    I think if the idea is to replace js, it should be a superset language at the interpreter level. I.e. the interpreter can run js, but valid js wouldn’t work with the compiler. It makes it a drop-in replacement without harming legacy

    • Pennomi
      link
      English
      510 hours ago

      WebAssembly is the target, not js, I believe.