On Fri, Apr 14, 2006 at 01:05:44AM -0700, Ingy dot Net wrote:
| Why can't a block value contain ": "? Please rmind me why we have this
- ordered: mapping
- which: has this shorthand
- ordered: duplicate keys permitted too
In this case, ": " is used to distinguish between the key an the value;
this feature is currently being used by at least one PhP person I know.
But, it is making it hard for Brad Baxter, who would like to do stuff
- Artistic Facture: Non-Visible Art
- Murals of Bonampak: Old Pretty Pictures that Matter
As for me, I'm fairly well resigned to putting any scalar more
complicated than, say, a word, in quotes. Then the only
rule to remember is to quote any enclosed quotes. One of yaml's
goals is "easily readable by humans". The jist of my concerns
about plain vs quoted scalars is "easily editable by humans". I
can understand if this is seen as less important compared with
all of yaml's goals.
That said, I do wonder if there is a window open for the
idea of different flavors of yaml: yaml-simple, yaml-json,
yaml-whathaveyou. So yaml-json might accept and emit
only strict JSON syntax. And yaml-simple might exclude
those features that would necessitate quoting a plain scalar
(assuming such is possible).
You might now be searching for a remote brick hurling protocol.
If so, that's fine, I'm only partly serious. But it does seem that
trying to accommodate a number of exceptions (in the name of
human friendliness) and maintaining that very friendliness can
be somewhat at odds. If only computers will write the data,
and the data is then readable by humans, accommodating the
exceptions is easier. If humans want to write the data, and
must therefore know all the rules, it is a bit harder.
Someone should write an AJAX yaml editor. Or would it be