3 ms·
I probably need to write a blog post about this, but "full-blown programming languages" have 2 features that config files generally don't. And people often con
by chubot 6y ago
I probably need to write a blog post about this, but "full-blown programming languages" have 2 features that config files generally don't. And people often conflate them:
1. arbitrary I/O -- can I read a file from disk, open a socket, make a DNS query, etc.
2. arbitrary computation -- can I do arithmetic, can I capitalize strings, can I write a (pure) Lisp interpreter, etc.
I claim that the first IS a problem but the second ISN'T.
Arbitrary I/O is a problem because it means the configuration isn't reproducible / deterministic, so it's not debuggable. Your deployed system could be in a state that depends on the developer's laptop, and then nobody else can debug it.
The second is NOT a problem. As long as the state of the deployed system is a FUNCTION of what you have versioned/configured, then it's no problem. Functions are useful. Pure functions can also be expressed in an imperative style (another design issue that's commonly confused).
Related thread: https://lobste.rs/s/gcfdnn/why_dhall_advertises_absence_turing https://lobste.rs/s/gcfdnn/why_dhall_advertises_absence_turi...
and my other comment in this thread: https://news.ycombinator.com/item?id=26277812 https://news.ycombinator.com/item?id=26277812