I feel that Yaml sucks. I understand the need for such markup language but I think it sucks. Somehow itโs clunky to use. Can you explain why?
It sucks the same way Python sucks. Some people just really donโt like indentation-based syntax. Iโm one of them, so I dislike both formats. However, if you groove on that sort of thing, I donโt think YAML is any worse than any other markup.
Oddly, I get along with Haskell, which also used indentation for scoping/delimiting; I canโt explain that, except that, somehow, indentation-based syntax seems to fit better with functional languages. But I have no clear argument about why; itโs just an oddity in my aesthetics.
You canโt say pythonโs whitespace usage is as bad as yamlโs. YAML mixes 2 and 4 spaces all the time. Python scripts donโt run if you write this kind of crap.
And whitespaces is really just the tip of the iceberg of YAML problemsโฆ
YAML mixes 2 and 4 spaces
I think thatโs a user thing and it doesnโt happen if you have a linter enforce 2 or 4.
Thatโs part of the problem. Different number of whitespaces indicate different nesting levels and the YAML spec does not enforce them. These two horrible YAMLs are valid and are not equivalent:
a:
b:
- c
- d
- e
f:
"ghi"
a:
b:
- c
- d
- e
f:
"ghi"
YAML mixes 2 and 4 spaces all the time. Python scripts donโt run if you write this kind of crap.
Sure it does. You only need to be consistent within a block. Pythonโs syntax is ridiculous and solves problems that basically donโt exist.
All of my java/kotlin/rust/etc. code is trivially well formatted and can be done by my editor. Moving code blocks is trivial. Refactoring is easier when I didnโt need to hand -format the code just to make it work.