Hacker News new | ask | show | jobs
by stagefright89 469 days ago
yaml sucks to work with as it is. i work with k8s day in and out. this to me seems like a bad idea taking away the programmability with a tightened structure. For beginners who can't write shell scripts well, this may seem promising. Cool concept though. just not very practical imo.
2 comments

Not that hard to write something that outputs YAML.

The usefulness of YAML is having declarative files that are simple.

But once you start adding templating it sucks as much as anything else.

> Not that hard to write something that outputs YAML.

The point of this is to lower the entry cost of producing interactive CLI apps. If I have to break out a more expressive language to use it I may as well just write my program in that language in the first place.

> The usefulness of YAML is having declarative files that are simple.

There are other config formats that provide this and don’t rely on sometimes ambiguous whitespace based structure (eg. TOML). While you can write JSON in a YAML file to avoid this, you’ve then nullified all of the supposed ‘benefits’ of YAML.

the real fun happens when you're doing templates inside of templates and you have to figure out how to escape quote characters correctly
Valid! Also, is it weird I don't mind yaml? :P
Not at all! I think there's a pretty natural flow for folks to have a love affair with YAML over the past decade or so of comp sci. You're seeing plenty of folks with "YAML DSL fatigue" because folks have seen this pattern many many times, and I imagine are a bit gunshy of "yet another YAML thing". That said, I have regular conversations with someone who would rather do everything he could in Ansible if he could, where I've become a fan of using CDKs since the power of an existing language's primitives combined with specialized knowledge distilled and packaged in an API I can call gives me superpowers. You're comfy in YAML and that's awesome. Keep making stuff that vibes with you!
+1 for CDK-like strongly-typed stuff :)

but that's simply in a different region of the solution space compared to Go + YAML

I like it as a configuration/data language, but not as a a pseudo-programming language.