In short, Amber is a programming language with Rust like syntax that compiles down to bash. More details here: https://amber-lang.com/

On the surface, it seems nice. Cleaner syntax, types, compile-time safety checks, etc. So you get to write in something nicer than bash but get the portability of bash.

My wonder is if there are pitfalls that make it worse than instead writing it in something like Python or even bash itself. I’d guess the generated bash code probably isn’t the prettiest to look at or debug.

    • False@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      14 hours ago

      I’d say no. Even C needs external libraries.

      I guess Rust does this too though - in which case transpiling rust to bash is even less appealing :shrug:

      • Quibblekrust@thelemmy.club
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        12 hours ago

        Even C needs external libraries

        You can compile a C program while statically linking the libraries, thereby producing a single binary with no runtime dependencies. Just because Go can do this, too, doesn’t mean it’s special. It’s just that most libraries for Go ship as source code and not as compiled libraries. But as soon as you import some actual library like Sqlite, OpenSSL, GTK or whatever, using some wrapper codr, you’re going to have the same dependency issue.