Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"everyone hates yaml" hah. Shocking how we're stuck on these problems.

The old line about "the problem that it solves is not hard and it does not solve them well" about XML is kind of hilarious when we're still facing the same thing about its current popular replacements - JSON and YAML.



I'll take limited YAML over JSON any day of the week for things that might be edited by hand. The cleaner diffs when appending to a list alone are worth it.


True, but when the YAML file gets long and complicated, such as when a kubernetes YAML spec, it becomes difficult to figure out what indentation different items need to be at and you end up needing to use tools other than just your laptop: https://twitter.com/Caged/status/1039937162769096704?s=19


Hah, I can see my own old response to that tweet.

Anyways, as horrifying as it is, that's actually an argument in favor of XML. After all, would being lost in {} be that much better than indents? You'd still be scrambling to figure out how deep you are in a deeply nested object.

The obnoxious repetition of xml's closing elements actually helps here since you can see what object you're closing.

...

But I hate XML.

At this point I'm fantasizing about using heavily-sandboxed Lua and going fully Turing-complete so when your files are getting horribly complicated you can start doing some minimal reuse.


I guess the temptation would be to say that it is in fact a hard problem. But then I look at something like HOCON which basically solves all the problems with YAML, you can understand it after about half an hour of reading, but somehow it's a fraction as popular as yaml or json. Maybe it just lacks marketing muscle or a really visible project.


YAML is all nice and dandy when the file you're writing is relatively simple. When what you're doing expands beyond a single key-value data structure, things rapidly take a turn for the tragic. JSON is fine, and I can live with XML, but save me from YAML.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: