Abstraction, not syntax
17 hours ago
- #abstraction
- #yaml-alternatives
- #configuration
- The world is growing tired of YAML, with alternatives like TOML, KDL, and JSON supersets gaining traction.
- Syntax differences between configuration formats are superficial; the real issue is data models and abstraction.
- Example shows bugs in a JSON configuration for cloud storage buckets, highlighting issues with repetition and manual errors.
- Abstraction (e.g., using loops in RCL) reduces bugs and improves maintainability by eliminating duplication.
- Trade-offs of generating configuration include added complexity, reduced greppability, and the need for intermediate build steps.
- Tools like Cue, Dhall, Jsonnet, or RCL help eliminate boilerplate, but even simple scripts in Python or Nix can be effective.
- Conclusion: While simpler formats like TOML are better than YAML, the real need is for abstraction to handle complex configurations.