New Programming Langauge Makes Bash Scripting Easier
news.itsfoss.com
news.itsfoss.com
I didn't know that ECMAScript had such lofty goals.
Would TypeScript make sense to use? I'm used to having types everywhere but I'm sure many (especially coming from bash) wouldn't.
To me it feels like trading one set of idiosyncrasies for another (or a combination) and we've been warned:
> This project is in the early stages of development with only an alpha release at the moment. Experiment with it if you want but don't use it in a production environment.
I guess the selling point of Amber is the fact it compiles Bash so you can sneakily start using it without having to argue with your co-workers whether language X should be allowed in the code base. Plus, no worrying about having the right Python version installed. Though then again I am not sure the compiled bash is very idiomatic so probably still not easy to get into code review.
For example, OSX (still) ships with Bash 3.x as the default, while many Linux distros have Bash 4.x, and the latest Bash is 5.x.
I have some personal rules of thumb/guidlines around this, if a bash script does any of the follow it should be put on the docket to be converted to a Python script/app:
- a nested for loop with more then one level of nesting.
- anything involving arrays/list.
- anything involving json beyond simple queries.
- more then 5 functions.
The key selling point is that you never have to totally rewrite your existing bash scripts - there’s an incremental upgrade path.