Can someone explain to me what is so horrible about curly braces that we need a whole host of "human-friendly" configuration languages with nontrivial parsing just to get around them?
Can someone explain to me what is so horrible about curly braces that we need a whole host of "human-friendly" configuration languages with nontrivial parsing just to get around them?
s/JSON/YAML/g
s/curly braces/whitespace/gWith JSON it's fairly easy for me to know if I want to end my structure as well as the structure containing it, I can just type }}, and add the next element.
With whitespace you have to keep track of HOW MUCH whitespace, and trust me once you've got people who are entirely inconsistent with how much whitespace they use it becomes a huge PITA.
I find that paste/format on copy/paste with YAML can be kind of troublesome too though... I have an exception in my vscode settings file for that format, my default is format on paste and save.
The following would have parseable structure, but would be free of visual noise.
Title: Markup languages: decades of going in the wrong direction
Keywords: hypertext,
delimiters,
ˋ, ", \Control characters are invisible, using them means changing text editors to display them. They are also, outside the usual ones, hard to type. ASCII ones have Ctrl combos, but editors used those for other things.
Also, what is the difference between using some new character to start block and "{" or "\n"? Why have new thing to indicate new level when have space and tab?
Yes. Change of paradigm does require change of tooling. If some legacy tool doesn’t support new format, it’s not a good reason not to use new technology - either tool evolves or a replacement emerges and typing won’t be a problem. Classic formatting commands from rich text (Ctrl-B etc) can be repurposed, for example.
>Also, what is the difference between using some new character to start block and "{" or "\n"?
Any such delimiter has other use in text. Dual use means extra ceremony with escaping and extra complexity. Whitespace as a delimiter has especially bad UX, because most editors don’t understand the semantics and it is very to make mistakes.
It depends, if you allow nesting you also need escaping.
They are not used in editors that I have ever seen.
They are theoretically accessible as ctrl-/, ctrl-], ctrl-^, ctrl_
Editors absolutely should be able to show them using syntax highlighting.
Probably most of the first 32 can be repurposed.
< date="today" id="978"/>
I could have used this many times.
Allowing only valid JavaScript identifiers to be unescaped keys is also a bit quirky (You have to quote reserved keywords).
But they will never change any of that because it would break JavaScript compatibility.
It seems trivial, but replacing scope delimiters with a per-line signifier (i.e. indent) makes the scope of each line self-contained and sidesteps that discussion.
Is that worth YAYAML (Yet another YAML)? I don't know. But I certainly get the desire to skip the discussion :)