We Deserve Better Than JSON as a DSL
It always starts simply. You need a config, and you want to keep it simple this time. What's simpler than JSON? Some keys, some nesting, done.
Six months later the file looks like this:
{
"timeout": "5m",
"memory": "2GB",
"retries": "{{ env.CI ? 5 : 2 }}",
"url": "${PROTOCOL}://${HOST}:${PORT}"
}
Four values, three of which are secretly something else. "5m" is a duration someone has to parse. "2GB" is a size someone has to parse, and whether that's 2000 MB or 2048 MiB depends on which library parses it. The other two are expressions in a template language you invented, which a new hire has to be told about because nothing in the file says so.
