Hacker News new | past | comments | ask | show | jobs | submit login

What do you think is a suitable alternative to custom yaml formats?



Inventing new configuration languages to get away from yaml is a blisteringly terrible plan.

Yaml doesnt spark joy for me, but it's ok & there's lots of good tools & libraries to support it. Json & toml are basically the only other modestly well supported options out there.

This looks like a Yet Another Next Generation (YANG) variant. At least just use YANG. Even though it's vastly less supported.

For real, the amount of griping about YAML is unbelievable. It's not great but so what. It does the job. What people really are griping about usually is how much configuration/state is required. Where the spaces go, whether there's parenthesis or not is so far down the list of important factors. Metric miles behind "are there good tools & libraries?," for one.


You can use parenthesis with YAML though. It’s just not a common idiom.


Why is a custom format needed? Why not just use JSON or YAML?


That's totally valid! I don't have an opinion either way. I've heard people complain about yaml before and now seeing a strong reaction to another custom format I was curious to see what people would propose.

It would seem however from the responses I've been getting, that though YAML can be difficult or messy it's still better than another custom format.


I think HCL is very nice. Easy to read and write, has clear types, has basic functions (arithmetic, string manipulation, etc) with the ability to extend with custom functions as well. It can also be easily converted to JSON, which is a pretty cool way of adapting for machine manipulation.


Toml

JSON if you hate comments


for me, comment is a must for configuration format.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: