5 comments

[ 3.2 ms ] story [ 21.1 ms ] thread
Author here.

I was growing frustrated with the increasing about of programming that seems to happen in YAML files. At the same time, my friend Krystal was telling me about INTERCAL, an esoteric programming language that is designed to be hard to use. I had fun observing the ways that these two are different and the ways that they are the same.

I'm happy to hear what people think of this article. I am assuming because 'programming in yaml' is so prevalent that many people don't agree with me.

I think YAML as a language has many faults.

That said, this isn't YAML being a bad language. It's just people abusing YAML.

Yeah, thanks for reading my rant. I agree. Its not that I have a problem with YAML itself - although it is bad.

My problem is people embedding a DSL inside or ontop of YAML. Then you end up with the worst combination of config and an adhoc programming language.

People just seem to keep reinventing makefiles, JCL, shell scripting... and usually make it worse.

Probably the moment at which you start thinking about adding branches or other control structures to your config file syntax is the moment at which you should stop for a long, hard examination of why you're doing this, and whether or not there's already a better way of doing this.

If you really need that kind of thing, why not go whole hog and use Guile or Lua or something like that?

> I am assuming because 'programming in yaml' is so prevalent that many people don't agree with me.

Conditional logic is not something implicit or facilitated by YAML; if JSON was the prevalent configuration format, the same or similar constructs (hacks) would be adopted.

JSON (as in the designer) actually tried to do something against hacks - removing comments syntax - but one can use an object to implement if/then/else.

"Programming" as described in the article is not inherent in YAML.