Re: YAML Was: CommitFest status/management

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: YAML Was: CommitFest status/management
Date: 2009-12-02 14:48:33
Message-ID: 4B167E41.70406@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Josh Berkus wrote:
> On 11/30/09 8:17 PM, Andrew Dunstan wrote:
>
>> Do we have consensus yet that we want YAML? It seemed, well,
>> yet another format without all that much advantage over what's
>> there.
>>
>
> Well, what's the code count? What dependencies, if any, does it add?
>
>
>

The patch itself is quite small. There are no extra external dependencies.

YAML and JSON are pretty much interchangeable for our purposes.
According to Wikipedia, "Both functionally and syntactically, JSON is
effectively a subset of YAML." See
<http://en.wikipedia.org/wiki/JSON#YAML> So the YAML parsers should be
able to handle the JSON output. The only thing we'd be buying with this
patch is making a bit happier some people who prefer reading the YAML
syntax. For machine readability we'd be gaining precisely nothing.

I guess the question is this: when are we going to say "No more output
formats. We have enough."?

One consideration is this: the more formats we support the dumber the
output will be. Already the XML output is arguably dumber than it should
be, because XML elements are two-dimensional (they can have property
lists (attributes) and child elements) but JSON/YAML nodes are
one-dimensional, so we have made some things that one might normally
expect to be attributes in XML into child elements. While adding YAML
won't impose any additional burden of that kind, because its semantics
are so close to those of JSON, other output formats well might.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2009-12-02 15:02:17 Re: compile error with -DOPTIMIZER_DEBUG
Previous Message Dimitri Fontaine 2009-12-02 14:33:53 Re: Page-level version upgrade