JSON as configuration files: please don’t (2016)
&quot;Lack of programmability&quot; is a feature. Declarative config lets tools statically analyze and transform the config. You can&#x27;t even figure out what the dependencies are going to be for some Gradle projects without executing them. <a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;51153878&#x2F;conditional-dependencies-in-gradle" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;51153878&#x2F;conditional-dep...</a> -- The author&#x27;s programmable example is a classic Bad Idea in my experience.<p>Also, check out JSON schema and its integration into tools like VSCode. VSCode gives you generalized autocomplete on its own config and known config formats like package.json by pulling in json schema definitions. It works well. Easily a better experience than the executable-program-as-config I learned to hate in the JVM world, and easily better than ad-hoc config like Caddy&#x27;s.<p>I have a more practical pitch: make your tool consume json5 as well as json.<p>Also, it&#x27;s telling that the author wasn&#x27;t even willing to stick their neck out enough to pitch a single solution. I guess in the end they realized there are always trade-offs and any alternative would have its own downsides. :) But I&#x27;m getting a bit fatigued of these you&#x27;re-doing-it-wrong posts. They are effortless to write and they&#x27;re like crack to HN. I can complain about literally everything.