4 ms·
Configuration files need to be powerful programming languages (in terms of expressiveness) while being restricted (in terms of network and I/O and non-determini
by kccqzy 1y ago
Configuration files need to be powerful programming languages (in terms of expressiveness) while being restricted (in terms of network and I/O and non-determinism). We need to aim very high for configuration languages especially when we treat them like user interfaces. Look at Cue (https://cuelang.org/ https://cuelang.org/), Starlark or Dhall (https://dhall-lang.org/ https://dhall-lang.org/) for inspiration, not JSON, unless your configuration file is almost always written programmatically.
- candiddevmike 1y agoOr Jsonnet (https://jsonnet.org https://jsonnet.org), if you do like JSON but want less quoting.
- deleted 1y ago[deleted]
- madeofpalk 1y agoAny configuration language that doesn't support strict/user/explicit types is worthless (ahem jsonnet). The idea of configuring something but not actually having any sort of assurances that what you're configuring is correct is maddening. Building software with nothing but hopes and dreams.
- arccy 1y agoexpressiveness unfortunately usually means that while you can read the output value, you lose the ability to modify it programmatically...
- foota 1y agoI don't know that I would particularly _want_ to modify starlark programmatically, but it's certainly not impossible. Build files in bazel for instance are nicely modifiable: https://bazel.build/concepts/build-files https://bazel.build/concepts/build-files.
- arccy 1y agoOnly if you stick to the lowest level constructs. Example with Terraform HCL: if everything was just declared as plain resources, you can modify them trivially. But HCL has functions, so people try to DRY their code by declaring some custom input variable, running maps/filters/reshaping it until it's unrecognizable and them generating a dynamic set of resources out of it. There's no way a program can work through the reverse of all the input reshaping logic to e.g. add another resource without knowledge of the custom input structure.
- ruuda 1y agoIn RCL you can edit source files programmatically with `rcl patch`: https://ruudvanasseldonk.com/2025/automating-configuration-updates https://ruudvanasseldonk.com/2025/automating-configuration-u...