Amber - the programming language compiled to Bash

syd@lemy.lol to Programming@programming.dev – 197 points –
Amber The Programming Language
amber-lang.com

New favorite tool 😍

94

You are viewing a single comment

There is no sh shell.

lol

Yes, there was the bourne sh on Unix but I don't see how that's relevant here. We're talking about operating systems in use. Please explain the downvotes

It's relevant because there are still platforms that don't have actual Bash (e.g. containers using Busybox).

sh is not just a symlink: when invoked using the symlink, the target binary must run in POSIX compliant mode. So it's effectively a sub-dialect.

Amber compiles to a language, not to a binary. So "why doesn't it compile to sh" is a perfectly reasonable question, and refers to the POSIX shell dialect, not to the /bin/sh symlink itself.