The following configuration file is parsed by the C/C++ libconfig library as a list with two groups:
foo = (
{
key="val";
},
{
key="val2";
},
);
but rust-config treats it as a syntax error due to the trailing comma after the second closing curly brace. It would be nice if it were accepted so the behaviors were identical between the two libraries. Personally, I think trailing commas are just nice in general, since they make diffs cleaner.
I don't believe this behavior of libconfig is actually documented: their grammar for lists looks like it would reject trailing commas. When I get time to investigate fully, I'll submit a bug on that project to have the grammar updated to match reality.
I also need to check whether libconfig accepts trailing commas in arrays; I expect it to but don't know for sure.
The following configuration file is parsed by the C/C++ libconfig library as a list with two groups:
but rust-config treats it as a syntax error due to the trailing comma after the second closing curly brace. It would be nice if it were accepted so the behaviors were identical between the two libraries. Personally, I think trailing commas are just nice in general, since they make diffs cleaner.
I don't believe this behavior of libconfig is actually documented: their grammar for lists looks like it would reject trailing commas. When I get time to investigate fully, I'll submit a bug on that project to have the grammar updated to match reality.
I also need to check whether libconfig accepts trailing commas in arrays; I expect it to but don't know for sure.