New favorite tool 😍

  • Eager Eagle@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    ·
    6 months ago

    with no support for associative arrays (dicts / hashmaps) or custom data structs this looks very limited to me

    • FizzyOrange
      link
      fedilink
      arrow-up
      5
      arrow-down
      2
      ·
      6 months ago

      Does Bash support those? I think the idea is that it’s basically Bash, as if written by a sane person. So it supports the same features as Bash but without the army of footguns.

      • BatmanAoD
        link
        fedilink
        arrow-up
        5
        ·
        6 months ago

        A language being compiled should be able to support higher-level language concepts than what the target supports natively. That’s how compiling works in the first place.

        • FizzyOrange
          link
          fedilink
          arrow-up
          2
          ·
          6 months ago

          That depends on how readable you want the output to be. It’s already pretty bad on that front. If you start supporting arbitrary features it’s going to end up as a bytecode interpreter. Which would be pretty cool too tbf! Has anyone written a WASM runtime in bash? 😄

          • BatmanAoD
            link
            fedilink
            arrow-up
            2
            ·
            6 months ago

            Honestly, wouldn’t it be great if POSIX eventually specified a WASM runtime?

            • FizzyOrange
              link
              fedilink
              arrow-up
              1
              ·
              6 months ago

              Yeah definitely! I wouldn’t hold your breath though. Especially as that’s pretty much an escape route from POSIX. I doubt they’d be too keen to lose power.