dub: JSON, SDL, YAML, TOML, what color should we paint it ?

Steven Schveighoffer schveiguy at gmail.com
Wed Mar 1 14:44:24 UTC 2023


On 3/1/23 4:14 AM, Mathias LANG wrote:
> On Wednesday, 1 March 2023 at 07:41:02 UTC, tastyminerals wrote:
>>
>> It is safer to just go with whatever is used and accepted as a 
>> reliable format for configs. I like the idea to use plain D tbo.
>>
>> JSON lacks comments, but it's fine for minimal default projects. We 
>> try to use TOML everywhere in a company, although I cannot say how 
>> well it works as a config for building projects. YAML is the most 
>> risky, since it has a high chance to alienate a sizeable amount of 
>> potential users.
> 
> Why would YAML be the most risky choice ? For me it's quite the 
> opposite: It's a well known and accepted format, AND the implementation 
> is already there. So I clearly don't see how it would alienate users, 
> except if those users are also alienated by Github Actions, Circle CI, 
> Kubernetes, Ansible, Docker...

Because YAML is a huge, complex format. It not only contains a lot of 
specification, but has annoying rules (whitespace requirements) and has 
multiple ways of writing configuration -- within the same file.

JSON is much simpler. If YAML is chosen, I will stick with JSON. And so 
for many users, we add lots of complication for no benefit.

Even SDL has multiple ways of specifying things. It gets in the way. 
When there is one way to do something, you do that, and then you're done.

I'm not looking for artistry, cleverness or beauty in build files. I'm 
looking for structure and consistency.

-Steve


More information about the Digitalmars-d mailing list