It’s not about what you can or can not do. It’s about how it would look like. NGS is best for the intended use cases. The strength of the language is the “focus” on the domain.
Compared to bash, NGS has sane syntax, proper error handling, data structures. The things that are expected from anything modern. I feel like comparison to bash is not very fair to bash. It comes from another era, another set of expectations, other norms. Nobody today would allow $x to represent zero or more arguments depending on the data in $x.
Compared to general purpose programming languages, NGS has syntax and facilities for the “DevOps”y scripting domain: syntax for running external programs, handling of exit codes (surprise: not any non-zero exit code is an error), assert(Program("gsed")), warn("..."), error("...") and other domain specific things. Think jq or awk - they are just better for specific use cases.
Edit: as you don’t mention Java or Assembler because bash and a scripting language are more suited for the task at hand, I claim that for some use cases, NGS is even better fit. See intended use cases - https://github.com/ngs-lang/ngs/wiki/Use-Cases
Hm. Interesting! But what can I do with this that I can’t do with either Bash or my favorite scripting language?
It’s not about what you can or can not do. It’s about how it would look like. NGS is best for the intended use cases. The strength of the language is the “focus” on the domain.
Compared to bash, NGS has sane syntax, proper error handling, data structures. The things that are expected from anything modern. I feel like comparison to bash is not very fair to bash. It comes from another era, another set of expectations, other norms. Nobody today would allow $x to represent zero or more arguments depending on the data in $x.
Compared to general purpose programming languages, NGS has syntax and facilities for the “DevOps”y scripting domain: syntax for running external programs, handling of exit codes (surprise: not any non-zero exit code is an error),
assert(Program("gsed"))
,warn("...")
,error("...")
and other domain specific things. Thinkjq
orawk
- they are just better for specific use cases.Edit: as you don’t mention Java or Assembler because bash and a scripting language are more suited for the task at hand, I claim that for some use cases, NGS is even better fit. See intended use cases - https://github.com/ngs-lang/ngs/wiki/Use-Cases
Author here. AMA here or in Discord - https://discord.gg/6VqgcpM