top | item 40436968

(no title)

manlobster | 1 year ago

I don't love the $...$ syntax for executing commands. Using $ as a string delimiter is very strange to my bash-accustomed eyes.

It's a shame that they provided such weird syntax for the most important thing you tend to do in a bash script, while providing fairly nice syntax for everything else.

discuss

order

chii|1 year ago

and i dont like how it's inconsistent that echo is not using the $ syntax (which makes sense internally, as it's a built-in, rather than executing the $echo command).

Overall, it is cute and neat, but i find that if you are looking to write bash scripts that require this level of programming, you'd be better off writing it in python, or perl. Only in very austere environments can this be utilized, but the requirement of having `bc` installed means you must also have the ability to run package installation, so might as well run the package installation for a full on programming language!

chrisjharris|1 year ago

I think that this does fill a niche. You can still compile to bash outside of this austere environment, and run the scripts within it. And python isn't very ergonomic for running external shell commands (or, say accessing environment variables), the syntax for doing so in amber looks much neater.

freedomben|1 year ago

> the requirement of having `bc` installed means you must also have the ability to run package installation

I don't remember ever installing bc, but I use it frequently and it's always there. Are you sure it's not already part of most base systems?

RodgerTheGreat|1 year ago

Shelling out to awk would be a more portable choice than bc, though awk would bring you much closer to the featureset of Amber to begin with.