[Distutils] comparison of configuration languages

Nick Coghlan ncoghlan at gmail.com
Thu May 12 03:20:21 EDT 2016


On 11 May 2016 at 15:47, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Having looked over the TOML spec, I like the simplicity
> of it (and I cringe from the complexity of YAML).
> The only thing I don't like about TOML is the way it
> cops out on nesting.
>
> The only reason it does that as far as I can see is
> because of a dislike for significant indentation.

This is a feature, not a bug. The trick is that TOML allows *implicit*
namespace creation when you only care about the innermost level:

[this.is.nested]
nice = "As a human reader & writer, you don't care about the nesting"

[this-is-not-nested]
nice = "As a human reader & writer, you don't care about the lack of nesting"

The only folks that need to care about whether the configuration is
actually nested or flat are those working with the config file
*programmatically* - from the point of view of the folks hand editing
the config file, it's always just the flat list of named key=value
sections that they're used to in traditional ini files.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Distutils-SIG mailing list