<quote name="Stuart Jansen" date="Wed, 28 Apr 2010 at 18:29 -0600"> > On Wed, 2010-04-28 at 17:56 -0600, AJ ONeal wrote: > > > He's right. If people can't tell just by looking at the two > > side-by-side, no amount of explaining will reach them either.
I would argue that, for usage as a config file, yaml is in fact quite similar to INI. INI: bigscreen=yes savedir=~ something=youbetcha YAML: bigscreen: yes savedir: ~ something: youbetcha XML: <bigscreen>yes</bigscreen> <savedir value="~"/> <something>youbetcha</something> Which brings up another pet peeve of mine with XML. There seems to be no rhyme or reason with whether you use <tag foo="bar"> or <tag>bar</tag>, or even sometimes <tag><text>bar</text></tag> or something similar. Maybe if you use XML like violence, you'd be good at reading it, and maybe even good at editing it. YAML is not simpler in terms of syntax and definition, but it is incredibly simple for human eyes to glance at and have a grasp of what's going on. > XML > - Opening and Closing Tags noisy and cluttery > - Self-closing Tags (trivial) a little better, but then you have to use attributes > - Attributes yuck, who was it complaining about ambiguity? > - Comments you can comment any language, some make it easier, some harder > - < > " > - CDATA (if you're crazy enough to use it) A side by side comparison of how different languages do escaping would be something quite useful. When you're configging, the last thing you want to worry about is complex escaping. > - Other Entities (if you're crazy enough to use them) > - Processing instructions (if you're crazy enough to use them) > - Namespaces (c'mon, we're talking about config files here!) > YAML > - Whitespace-based structure Humans understand whitespace > - Lists (multi-line & inline) > - Hashes(multi-line & inline) > - Blocks (folding and preserved) Flexible and readable. > - Comments Yep. > - String escapes Again, escaping comparisons would be useful. > - Node references (unlikely) > - Hash merges (unlikely) > - Multiple documents (unlikely) So you rail against YAML's complexity, but as you admit here, in a config file, you really wouldn't be touching most of that complexity. > So, looking at the two side by side, tell me again how much simpler YAML > is? Ya, gramatically, it is not simpler. Usability wise, hand editing, reading it *is* simpler. I would argue that the syntax is simpler. The grammar probably is at least as complex as XML and likely more so. The *syntax*, what we humans love to hate, is simpler. > Note that I deliberately collapsed several of the YAML syntax details to > keep from too unfairly penalizing YAML for its complexity. If you ask > me, they look about equal until you consider how much more matures XML > is and how many more tools are able to work with it. We're talking about config files here. If someone wants to delve into the dark complexities of YAML on a *config* file, then shame shame on them. Von Fugal -- Government is a disease that masquerades as its own cure -- Robert Lefevre
signature.asc
Description: Digital signature
-------------------- BYU Unix Users Group http://uug.byu.edu/ The opinions expressed in this message are the responsibility of their author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. ___________________________________________________________________ List Info (unsubscribe here): http://uug.byu.edu/mailman/listinfo/uug-list
