138
TOML
(lemmy.ml)
Post funny things about programming here! (Or just rant about your favourite programming language.)
Not-so-fun fact: if you're transferring a yaml or toml file and the transfer is incomplete, the receiving app may not even know! Yaml and toml both have a good chance of being apparently valid when cut off randomly. This doesn't impact JSON because of the enclosing {} or [].
Counterpoints:
}or]can also be a disadvantage of JSON, since you cannot stream it, i.e. start processing the fields/elements before the whole thing has arrived. (You probably still don't want to use TOML for that, though. JSONL, CSV or such are a better idea.)I'm only being pedantic. Toml is not bad. Yaml I personally don't like because I don't approve of semantically required whitespace but I know I'm in the minority there.
You make good, valid points and I know I'm talking about edge cases that require the stars to align to break. It reminds me of an old, not-quite-relevant-but-oh-well saying "a 'one in a million' chance at 1GHz happens every millisecond." The law of large numbers isn't always on our side.
Whitespace being part of semantics is always a bad design decision. You're not alone in this. I wish this was more widely accepted. But alas, it's not. For a configuration language I can accept it a bit more. But for a programming language it's a big faux pas in my opinion (looking at you python).