Re:A statically typed scripting language that transpiles to ...
by remus on Friday March 25, 2022 @02:56PM
(#30805838)
I wonder whether there's a subset of shell syntax that's stable enough and powerful enough that it could be used as the compilation target whilst avoiding the incompatibilities you mention?
Re:A statically typed scripting language that transpiles to ...
by goombacloud on Friday March 25, 2022 @03:43PM
(#30806329)
I also wonder if targeting bash which has things like pipefail and arrays could make things easier in the implementation side?
I feel that this seems like a good idea on paper, and a bad idea in the wild.
Last time I looked into shell syntax and such, I found out that most shells don't. They vary so greatly that very large context-free grammars have to be used to cover most of their context-sensitive rules. I don't think being POSIX compliant changes that.
I suspect that if this got popular usage, the bugs would be quite numerous.