Fritz Trapper wrote:
> Phillip Gawlowski wrote:
>> But one thing is annoying with YAML: Significant whitespace. \t or a
>> proper space have different meanings, as does the amount of space.
> 
> Thats really a bad issue.

Not at all.  I've never had a spacing issue in Yaml (except once when I 
was using an unfamiliar feature).  Have you?

> After reading docs on YAML, I decided to use 
> it for plane data only, no structs or trees, as I wanted to.

Why?  I use it for trees and other structures all the time.  It's very 
easy to read and write.  If you don't like the indented syntax, you can 
use the JSON-like syntax in places where it makes sense.

> 
>> Ain't it grant that
>> require "yaml"
>> var = Object.to_yaml # or dump, if you want to write a file
>> another_var = YAML.load var
>> 
>> makes it so very easy to use? And it can be read (not necessarily
>> written) by humans, too.
> 
> Yes, that's very elegant and useful für simple configuration files.

And for just about anything else.

> 
>> Try reading and writing XML in just one three lines! ;)
> 
> Reading complex data structures expressed in well formated XML is 
> possible. Reading the same in YAML is at least quite difficult.

I would usually say the opposite.  All the endtags in XML make things 
harder for me to read, not easier.  And the indentation will be the same 
in both pretty XML and Yaml, so no difference there.

Got a concrete example?

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen / marnen.org
-- 
Posted via http://www.ruby-forum.com/.