Agreed. I feel like everyone uses YAML, I hate it.
YAML feels like 10 steps back; no parser I've ever used has been able to accurately give me a line number for an error, white space issues make it impossible to work with without special editor features, and some of the types are just cryptic. I spend most of my time that's spent editing configs in vim over SSH and it can be challenging at times.
TOML resolves a lot of these issues in my experience but I'd still argue that by virtue of its capability, is still quite complex when trying to define configs for new applications.
Came across a pain point with TOML yesterday in use.
When trying out a CLI I've been writing recently, this time on Windows... the TOML config file (generated on first run) wasn't usable.
The problem turned out to be TOML not handling single slashes "\" in strings, instead treating them as escape characters.
Annoying as on Windows the paths are (eg): "C:\Program Files\stuff". Which then needs changing to "C:\\Program Files\\stuff" to work ok.
I can see both good and bad points of TOML's string handling there. But it's annoying it needs a workaround for one of the signature aspects (slash vs backslash) of windows. Especially when paths are very common in config files, regardless of OS. :/
Just use 'literal strings' instead of "basic strings".
TOML has two types of strings, each of which can be single line or multi line [0]. Basic strings allow escape characters, while literal strings do not (so there's no way to represent an apostrophe in a single line literal string). Multi line strings are like Markdown's code blocks:
"""
This is a multi-
line basic string.
C:\\Program Files\\stuff
"""
'''
This is a multi-
line literal string.
C:\Program Files\stuff
'''
TOML is my personal favorite.