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

> It's not really a solution though because you only notice you need to do it after it triggers a bug.

… the first couple of times.

After causing the same bug multiple times its the user at fault, not the tool.

YAML does a decent enough job.

I think these are the relevant YAML spec sections from a quick glance. If someone wants to correct me, feel free.

YAML spec on double quotes

> The double-quoted style is specified by surrounding “"” indicators. This is the only style capable of expressing arbitrary strings, by using “\” escape sequences. This comes at the cost of having to escape the “\” and “"” characters.

YAML spec on plain style

> The plain (unquoted) style has no identifying indicators and provides no form of escaping. It is therefore the most readable, most limited and most context sensitive style. In addition to a restricted character set, a plain scalar must not be empty or contain leading or trailing white space characters.




> After causing the same bug multiple times its the user at fault, not the tool.

Absolutely not. If the tool is so bad that users commonly make a mistake then the tool should prevent that mistake.

This is a basic UX tenet that unfortunately many people do not know.


It’s a trade off in how the parsing works. No tool is perfect. :shrugs:

The accepted safe default is to use double quotes. If folks don’t know that then that’s on them, not the tool. It’s in the spec.

Good workmen don’t blame their tools.

Edit — I know the UX tenet. I’ve worked in places where they thought using YAML for end users was a good idea. It’s not. It never will be. It’s a backend tool for engineers. So I agree with you in that specific UX case.

But this isn’t an end-user UX case. It’s backend platform configuration.

Use the right tool for the job, and use it the way it’s been designed —> Double quote strings in YAML.


> Good workmen don’t blame their tools.

Good workmen that are given shoddy tools absolutely blame them.


Good workmen don’t blame their tools.

Good workmen talk shit of particular tools and brands all the time, they just avoid having them in their toolbox. They don’t blame their tools, not all tools.


the first couple of times

Times every yaml user in the multiverse.


It’s a right of passage.

Just like convincing your boss to switch the backend over to K8s and then realising a year later it was a mistake.

Everyone does it.




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

Search: