3 ms·
> Config files are fantastic. Trivial to read, write, copy, track in version control, diff, grep, generate with scripts, etc. Code based configuration offers m
by flukus 7y ago
> Config files are fantastic. Trivial to read, write, copy, track in version control, diff, grep, generate with scripts, etc.
Code based configuration offers most of those benefits, just look at some of the suckless tools, if you've never used dwm or written a line of C I bet you can still guess
how to configure some stuff here: https://git.suckless.org/dwm/file/config.def.h.html https://git.suckless.org/dwm/file/config.def.h.html .
It doesn't work for all software of course, but for anything developer centric and/or anything with complex configuration done by experts it's a good choice, particularly for any software going down the path of creating a custom language (tmux, vim, etc). You get the power and flexibility of a full programming language, you get compile time config checks, you get excellent performance, you don't have to learn yet another config language and it's easy to write patches.
It's not great if you're targeting Joe Average, but neither is any configuration format, or any configuration at all.