I like TOML too, but speaking of footguns, there is one where it comes to serialization. If you have something like:
struct Foo {
int bar;
Baz baz;
int quux;
}
... you can't naively serialize this like: [foo]
bar = 5
[foo.baz]
...
quux = 6
because that makes `quux` a property of `foo.baz`, not of `foo`.The serializer has to be smart enough to recognize that primitive fields have to be serialized before object fields. As a practical example, Rust's TOML library is not smart enough to do so, though it does at least detect when this would happen and fails with a runtime error. (The workaround is to change your type definition to reorder the fields yourself.)
Ref: https://play.rust-lang.org/?version=stable&mode=debug&editio...