4 ms·
Can someone explain why you wouldn’t use python or lua, or even just plain JS?
by aronpye 6y ago
Can someone explain why you wouldn’t use python or lua, or even just plain JS?
- maattdd 6y agoToo dangerous! Your JS/Python/Lua code could do plenty of non desirable stuff (infinite loop, download trojan from the internet...etc). Dhall lang for example forbids all this, but still allow you to write simple functions to avoid repeat yourself.
- q3k 6y agoI don't understand dnjs either, but the reasons I use jsonnet over a mainstream language (like Python, Lua or JS) for configuration: - purity (within bounds of the local filesystem state; no dynamically computed imports; no networking; no file writes) - declarative, lazily evaluated - override syntax (allowing for a balance between explicitly defined APIs and some level of monkeypatching) - file-relative import syntax - simple interpreter that's easily embeddable into tools (no modules, no interpreter path, no global configuration files, etc)