4 ms·
Almost all those problems are solved by marking up the strings as strings, using " and ".
by milliams 4y ago
Almost all those problems are solved by marking up the strings as strings, using " and ".
- progx 4y agoThen they should make quotes necessary in the YAML-specification. Little more to write, but better to validate.
- milliams 4y agoI agree. They make a rod for their own back by having implicit conversion rules which, while well defined, are not well understood. "Explicit is better than implicit" and all that.
- progx 4y agoAdvantage: things like "literal_block: |" or ">" are not necessary with a simple quote. And i really don't know, why in hell they add binary-Data to a configuration language for humans.
- IshKebab 4y agoGreat idea. I would also suggest adding some syntax to make lists and maps more obvious (it can be a bit unclear in YAML). Maybe {} for maps and [] for lists.
- anonumous 4y ago[flagged]
- yccs27 4y agoMy wish for a dream config language is this: Allow a choice between unambiguously-typed expressions (quoted strings, only true/false, decimal numbers) and explicit type annotations. So this: regions: $[string] - no - se options: ${bool} a: yes b: no (with possibly a different syntax) would be equivalent to regions: - "no" - "se" options: a: true b: false
- runeks 4y agoNo, all the problems are solved by this. It’s really no wonder that it’s hard to create a language that’s supposed to know whether the author intended to write a string or not without it being indicated by the syntax. No other language in the world tries to do this, for exactly the reasons this article points out.