This Christmas had seen the release of two YAML-related modules which are bound to advance YAML support in Perl. First, Audrey Tang released YAML::Syck 0.01. And then YAML reached 0.49_70. Indeed, both (if I understood correctly) were inspired by the recent joint work of Ingy döt Net and Audrey, which took shape as code. They are the ones who should be doing such an announcement, but I am so eager to see complete/bug-free support for YAML that I could not resist to broadcast my salutation to these two outstanding Perl developers.
Yes, YAML’s syntax in the most basic form is very readable. But how writable is it at this point? It seems like YAML started out as a very cool config syntax that got out of hand due to serialiser envy, and subsequently grew a lot of syntax I have no use for in config files as well as a bunch of Perl-centric features that alienate other dynamic language communities. At the same time it does a bad job at non-trivial serialisation.
It’s a pity, because I was shopping around for “wiki markup
XML is (1) sometimes too verbose, (2) has an underlying model node(name, attributes, children) which doesn't map directly to Perl, (3) (on the pro side) has a very simple core and (4) is massively popular nowadays
JSON is (1) YAML with only inline collections - easily unreadable and (2) looks like Lisp (but with braces and square brackets). (3) Also very simple. (4) On vogue due to AJAX hype
Data::Dumper spits Perl - (1) Perl is good, but not necessarily easy, (2) not simple at all, but powerful
No no no. I mean, name any particular task, then tell me why YAML does this particular task better than any of the other choices. Just listing upsides and downsides of each particular choice is pointless.
As I conceded in the other post, as a debugging aid and for report generation, it’s good. But what else?
"Tell me why YAML does this particular task better than any of the other choices." How can I say such a thing? I can tell you that I already used YAML in pretty complex configuration files, with lots of metadata, and that was handy to write YAML rather than fussing around with the program source. But so I did with XML as well. And I have had the chance also to save YAML into databases as a portable way to load/dump structured data in plain strings/clobs stored in relational tables. But I don't claim it was
The original poster had a key point -- YAML is simple and safe. (I won't wade into whether it's as simple as it used to be or simple enough.) YAML does NOT use EVAL, so it's safe for cases where you don't want to trust the persons who might tweak the file.
YAML does not pretend to be readable Lisp, and thus doesn't drag in XML::Parser or other XS modules. If I want matching brackets, I'll use real lisp, thank you very much. (The latest announcement says you CAN have an XS module if you need speed, but why wou
-- Bill
# I had a sig when sigs were cool
use Sig;
Re: (Score:1)
Is there anything YAML does which is not better done using one of XML, JSON [cpan.org], Data::Dumper [cpan.org], or Storable [cpan.org]?
Re: (Score:1)
So YAML can be very very useful for config files (when
But as for the rest... I don't see anything shiny (unless there's something in the whole streaming thing I'm missing).
Re: (Score:1)
Yes, YAML’s syntax in the most basic form is very readable. But how writable is it at this point? It seems like YAML started out as a very cool config syntax that got out of hand due to serialiser envy, and subsequently grew a lot of syntax I have no use for in config files as well as a bunch of Perl-centric features that alienate other dynamic language communities. At the same time it does a bad job at non-trivial serialisation.
It’s a pity, because I was shopping around for “wiki markup
YAML x XML, JSON, Data::Dumper, Storable (Score:1)
Re: (Score:1)
No no no. I mean, name any particular task, then tell me why YAML does this particular task better than any of the other choices. Just listing upsides and downsides of each particular choice is pointless.
As I conceded in the other post, as a debugging aid and for report generation, it’s good. But what else?
YAML is better? (Score:1)
What YAML does better is what it does least (Score:1)
YAML does NOT use EVAL, so it's safe for cases where you don't want to trust the persons who might tweak the file.
YAML does not pretend to be readable Lisp, and thus doesn't drag in XML::Parser or other XS modules. If I want matching brackets, I'll use real lisp, thank you very much. (The latest announcement says you CAN have an XS module if you need speed, but why wou
Bill
# I had a sig when sigs were cool
use Sig;