From: Clark C. E. <cc...@cl...> - 2006-04-14 13:22:56
|
on fri, apr 14, 2006 at 09:09:23am -0400, brad baxter wrote: | > titles: | > - 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. You should be able to use the second-line block form for titles like this: title: |- Artistic Facture: Non-Visible Art | 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. Well, being able to write YAML is important, as long as you remember a hand-full of special characters you are usually OK; and when in-doubt use next-line block or double quoted. The next line block, imho, is nicer due to WYSIWYG. | 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). Well, we will be working on (soon actually) a JSON++ which adds to JSON our &anchor and *alias mechanism, plus the type library. This would be for "thin clients" that want to use YAML's data model (for graphs and typed nodes). | 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. Yes. I actually had pictured a very nice heuristic program that pretty-prints content. Hence my resistence to having anything in the "syntax model" that could possibly change the meaning of the data. With clean separation of models, a very nice pretty-printer could be used. | Someone should write an AJAX yaml editor. Or would it be | AJAY? I think that would be a delightful idea. Thanks, as usual for your feedback! Best, Clark |