in reply to Re^3: An Idiot's Guide to YAML
in thread An Idiot's Guide to YAML

I don't understand the problems that people have with YAML. I have thousands of lines of YAML config files, all produced by hand, and the only problem I ever had was using an editor that added a tab rather than four spaces.

The whitespace for me is a bonus, rather than a limitation - it makes it easy to read and thus easy to scan through.

For XML, you really need an XML editor - it is good for portability because it is well supported, but for maintaining config data by hand, for me, nothing beats YAML

clint

Replies are listed 'Best First'.
Re^5: An Idiot's Guide to YAML
by perrin (Chancellor) on Jun 09, 2007 at 14:40 UTC
    Well, my original question was why you prefer a YAML config over a perl one, or something simpler like an INI file.
      Sorry :)

      YAML is more concise than perl, and more powerful than INI.

      I realise that people are more comfortable with the poison they know, but I picked up YAML quickly, and fell in love with it quickly. For me, it just makes sense. I assumed it would be the same for others, so I'm always surprised when people don't see it the same way.

      Clint

      INI is great until you need to store anything with more than minimal structure. Lists and tables can be hacked in, but are not really supported.

      I've had to write code like this:

      my $param = get_ini_param('Foo','Bar'); my @param1_params = split /,/, $param; # repeat for 37 different parameters with different parsing requiremen +ts, slightly different structure.
      too many times. In the end I wind up rolling my own text serialization library just to use INI format.

      YAML solves this problem very nicely and, IME, it is easy to edit by hand.


      TGI says moo