by repsilat · 1y ago · 0 comments
Programming languages have comments and control flow, multiple popular implementations, and can have nice literals. Lack of Turing completeness is actually not a terribly useful feature if you trust the input (and you should probably just use protobufs or similar for untrusted inputs in that case.)
I do not want control flow of any kind in my configuration file. Nor do I want expressions or any kind of evaluation.
Greppability is a must-have feature for me. As is simplicity - I don’t want to have to deal with internalizing interpreter mechanics, rules for precedence, variable scope, etc just to figure out what config values my program is going to be provided with.
Any time I’ve been forced to work with a system which used a general or restricted programming language to express configuration, it’s been a nightmare.
Configuration is a type of API - and should be designed with the same care and goals including human legibility, orthogonality, “simple things should be simple to do”, surprise avoidance, stability, minimalism, etc.
Instead often what we get is little more than a sort of serialized form of the internal state of the system.