Avoid coding in YAML. Use a DSL.¶
Configuration in YAML is fine. Avoid coding in YAML (if conditions, looping, etc.).
When designing something for non-full-time-programmers to create new entries / configurations, I prefer a DSL in a programming language rather than programming in YAML.
Why? Because a DSL is not restricted (since it builds on top of a general-purpose language), and accomodates customization / complexity.
Plus, the DSL can generate the YAML for you, if you still wish to use YAML.
- A lesson in creating and using niche business DSLs at scale | Zerodha Tech
- YAML as data format is defensible. YAML as a programming language is not.
- KubeFlow DSL compiler that generates YAML vs. Argo Workflows YAML examples
- Hashicorp is providing general programming languages (TypeScript, Python) as an alternative to their custom config language (HCL) and JSON
- Kelsey Hightower on Kubernetes & YAML
- How to build a DSL in Kotlin
- Gradle Kotlin DSL
- Why shouldn't I just use python code for configuration?
- HN discussion : Don't use a DSL where a full programming language is what you need
- Modern CI is Too Complex and Misdirected | HN