3 ms·
What about, to gain saner semantics (static typing) while retaining the portability and versatility of shell scripts?
by maxbond 5y ago
What about, to gain saner semantics (static typing) while retaining the portability and versatility of shell scripts?
- chalst 5y agoTypical shell programming idioms are quite dynamic. You can give saner semantics, allowing a fair amount of static checking, without abandoning this dynamicity. What Andy Chu has been doing with Oil Shell is promising in this respect. It supports optional type annotations. Cf. https://www.oilshell.org/blog/2021/01/why-a-new-shell.html https://www.oilshell.org/blog/2021/01/why-a-new-shell.html
- Brian_K_White 5y ago"What about, to gain saner semantics (static typing) while retaining the portability and versatility of shell scripts?" I think I was insufficiently critical in a misguided intention to be nice. Let me correct that a little :) If the need is great enough for a DSL, then the need is great enough for python or c or any of 100 other fully fledged universally available languages, and either require it's interpreter or ship a binary. However annoying it may be to require a ruby interpreter or something, there is essentially no case where the most sensible answer is this "Vala-for-sh". It's the worst of all worlds. Taking the whole life cycle into account, it's not saner or portable or versatile, it reduces all of those.