Re: YAML Was: CommitFest status/management

From: Greg Smith <greg(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, Josh Berkus <josh(at)agliodbs(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: YAML Was: CommitFest status/management
Date: 2009-12-07 04:01:04
Message-ID: 4B1C7E00.9030308@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas wrote:
> The main point here for me is that the JSON format is already
> parseable by YAML parsers, and can probably be turned into YAML using
> a very short Perl script - possibly even using a sed script. I think
> that it's overkill to support two formats that are that similar.
>
It's not the case that JSON can be turned into YAML or that it just
happens that it can be parsed by YAML parsers. While there was some
possible divergence in earlier versions, a JSON 1.2 document *is* in
YAML format already. JSON is actually a subset of YAML that uses one of
the many possible YAML styles--basically, YAML accepts anything in JSON
format, along with others. This means that by providing JSON output,
we've *already* provided YAML output, too. Just not the nice looking
output people tend to associate with YAML.

Accordingly, there is really no basis for this patch to exist from the
perspective of helping a typical tool author. If you want to parse YAML
robustly, you're going to grab someone's parsing library to do it rather
than writing it yourself, and if you do that it will accept the existing
JSON output just fine too. Basically this patch lives or dies by
whether it looks so much nicer to people as to justify its code weight.

Given the above, I don't understand why writing this patch was deemed
worthwhile in the first place, but I hate to tell people they can't have
something they find visually appealing just because I don't think it's
an improvement. Consider me a neutral vote, although I suspect the
above may sway some people who were on the fence toward disapproval.

--
Greg Smith 2ndQuadrant Baltimore, MD
PostgreSQL Training, Services and Support
greg(at)2ndQuadrant(dot)com www.2ndQuadrant.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2009-12-07 04:03:10 Re: Reading recovery.conf earlier
Previous Message Greg Smith 2009-12-07 03:29:31 Re: [patch] pg_ctl init extension