Hacker News new | ask | show | jobs
by bhussai20 1551 days ago
Let me preface by saying this is pretty cool.

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.

2 comments

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?
I also wonder if targeting bash which has things like pipefail and arrays could make things easier in the implementation side?