📝 INTERCAL, YAML, And Other Horrible Programming Languages. TL;DR: we have lots of bad DSLs that are YAML with control structures attached on top of that.
With each year, fewer and fewer people laugh when I say “YAML developer”. I think there are several reasons why we have YAML everywhere.
One is that when you just start a project, YAML seems like a reasonable configuration solution. It’s relatively readable and there are parsers for all languages. And then one day you need control structures, and instead of rewriting everything, you simply add on top of it a template engine you like and call it a day.
Another reason is marketing. If you take a DevOps or JS engineer and introduce a new fancy tool, it’s easier to persuade them to pick it up if it’s YAML than if it’s Python or Clojure. Everyone knows that programming languages are hard and YAML is easy, right?
I think DSLs are even worse than YAML, though. At least with YAML you already have syntax highlighting, a code formatter, and a basic linter. Out of all Makefile, I strongly prefer Taskfile because I can work with it without learning a yet another poorly made syntax and installing yet another glitchy vscode extension.
If you need a powerful configuration language with control structures, reusability, and predefined variables, go pick Starlark (I posted about it in Russian here and here). Or simply make a Python library instead of yet another DSL interpreter. Python is installed almost everywhere, many engineers know it good enough, and it’s quite readable, especially for simple cases. With Python you get a huge ecosystem, linters, type checkers, code formatters, and all that cool tooling. For example, I made docked Python library that generates Dockerfile, and I alone could provide safety features and IDE support that Dockerfile cannot dream of.