4 ms·
Can a config mechanism where shell commands are embedded as strings still be considered as offering these additional guarantees? Perhaps certain things are eas
by rectang 6y ago
Can a config mechanism where shell commands are embedded as strings still be considered as offering these additional guarantees?
Perhaps certain things are easier: it's easier to parse, to isolate the code portions, and to read data portions. But then validating what's inside those code portions is a challenge.
It seems like there's an opportunity for a programming language purpose built for the task of configuration. Its chief feature would be the ability to provide a lot of information when read in "inert data" mode, yet also provide full programming language power when read in "run" mode.
ETA: Perhaps embed Python inside something similar to YAML, and support active code via a "lambda" type. Use indentation for delimiting.
project: "Foo"
version: "1.0.1"
email: "me@example.com"
load:
lambda file_path:
pass