Re: YAML Was: CommitFest status/management

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: YAML Was: CommitFest status/management
Дата
Msg-id 4B167E41.70406@dunslane.net
обсуждение исходный текст
Ответ на Re: YAML Was: CommitFest status/management  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: YAML Was: CommitFest status/management  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: YAML Was: CommitFest status/management  (Josh Berkus <josh@agliodbs.com>)
Список 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




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Page-level version upgrade
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: compile error with -DOPTIMIZER_DEBUG