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

Every time I read one of these types of stories, I keep telling myself that there needs to be a stricter subset of YAML with far fewer features and things like required string quoting. I feel like it has to exist, but I don't know where it'd be found.



Since such a subset would be valid YAML, it sounds like requiring string quoting would be a straightforward option to add to any YAML parser as a feature, without requiring much of a spec at all.

What else would be needed?


JSON?


The trailing comma thing gets me nearly every time I edit a json config file.

I don't think json supports comments, which makes it a non-starter for a lot of folks.


Extra fun: there's now JSONC which does support trailing commas and comments, and projects will use it with a .json extension still because Microsoft would hate for anything to ever be clear and make sense.


JSON but with the structure of YAML, would be nearly perfect to me. JSON was not designed for humans to read and write directly, it happens to be easy enough that it's quite common but it's not exactly a nice experience. Take that base and remove the need to quote key values, enforce indentation for clear structure and to remove the need for braces and commas (the no trailing commas rule in JSON kills me too), and support the markdown-like list syntax alternative and I think really that's all most people want out of YAML anyways. I don't understand or ever want to work with their references or variables or whatever the hell they add, any of that is much better off in code than in config as far as I'm concerned.




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

Search: