Clark C . Evans [05/04/02 22:02 -0500]:
> Perhaps for simple configuration and/or log files
> we are too complex. However, people are using XML
> for log and configuration files; and XML is more
> complex than YAML.
[Warning: rant]
I use YAML a lot at work, and the only (real) complaint I have is that the
YAML spec didn't make it a requirement for the #YAML:xxx tag to change with
each release of the spec, before we settle down to an approved 1.0 status. I
still have a bunch of old files lying around that look like this:
--- #YAML:1.0 %
foo: bar
baz: com
This claims that it's a 1.0 document, because the spec was called 1.0 last
year in September, as it is today. But September-01's YAML is different from
April-02's YAML. How different? Different enough.
IMHO, YAML parsers of today should croak on #YAML:1.0, and we shouldn't be
encouraging people to use that. We should be encouraging people to use
whatever spec numbering system we're using:
--- #YAML:10mar2002
foo: bar
baz: com
When we declare the spec frozen (really frozen) we should endorse a version
number.
> Many people I know think XML is ugly till they started to use it day
> in and day out.
Let's be fair: XML is pretty as long as you _make_ it so. Machine-generated
XML tends to look awful. YAML looks nice because it has to:
<?xml version="1.0"?>
<package name="YAML" version="0.30" publisher="CPAN">
<author name="INGY" />
<tarball location="authors/id/I/IN/INGY/YAML-0.30.tar.gz" />
<modules>
<module name="YAML" version="0.30" />
</modules>
<scripts>
<script name="ysh" version="" />
</scripts>
<license type="Perl" from="YAML.pod">
This module is free software. You may use, redistribute, and/or
modify this module under the same terms as Perl itself.
</license>
</package>
--- #YAML:1.0 !activestate.com/PPM/package_description
name: YAML
version: '0.30'
publisher: CPAN
author: INGY
tarball:
location: authors/id/I/IN/INGY/YAML-0.30.tar.gz
modules:
- name: YAML
version: '0.30'
scripts:
- name: ysh
version: ""
license:
type: Perl
from: YAML.pod
content: ]
This module is free software. You may use, redistribute, and/or
modify this module under the same terms as Perl itself.
Both of those look reasonable to me. Of course, what comes out of
XML-producing systems often looks like this:
<?xml version="1.0"?><package name="YAML" version="0.30"
publisher="CPAN"><author name="INGY"/><tarball
location="authors/id/I/IN/INGY/YAML-0.30.tar.gz"/><modules><module
name="YAML" version="0.30"/></modules><scripts><script name="ysh"
version=""/></scripts><license type="Perl" from="YAML.pod">This module is
free software. You may use, redistribute, and/or modify this module under
the same terms as Perl itself.</license></package>
Whereas YAML-producing systems look just as nice as the human-typed version.
Leading me to my belief that XML is really a binary protocol. If you can't
read it, it isn't text. (I can't wait for YAML-RPC to take off. A colleague
of mine showed me an example of it working, but there are only two clients in
the world :)
Later,
Neil
|