(keitai-l) XML vs. syntactic sugar (was Re: Re: open source keitai tools (was Re: Re: western phone, imode si)

From: Michael Turner <leap_at_gol.com>
Date: 02/27/02
Message-ID: <007b01c1bf40$036a6100$8c42d8cb@phobos>
[Curt]
> As for Christian's thought about using a format easier to edit than
> than XML:  I'm open to that. If we're not getting an extra boost
> from XML that makes up for the difficulty, why use it? In fact, we
> might just as well do the initial implementation with Java-style
> properties files, and move to XML only when we figure out how that
> doesn't work for us.

An ESR point: "When your language is nowhere near Turing-complete,
syntactic sugar can be your friend."

("Oh, bollocks," I hear, from somewhere off in Kyushu.)

But it's a good point.

Say you have the two configuration files sampled below.  Which of
the two would you expect people to report errors in, and fixes for,
sooner?

This one?

device default {
    id="W";
        device imode {
            id="X";
                device 502i {
                    id="Y";
                        device SO502i {
                            id="Z";
                        }
                }
        }
}

Or this one?

<device id="default">
    <parameter id="W">W</parameter>
    <device id="imode">
        <parameter id="X">X</parameter>
        <device id="502i>
            <parameter id="Y">Y</parameter>
            <device id="SO502i">
                <parameter id="Z">Z</parameter>
            </device>
        </device>
    </device>
</device>

They're both ugly, but far better to generate XML from
something like the above, than to write it directly.  XML
is more like syntactic gristle than syntactic sugar.

What is XML good for?  You can:

 (1) generate various different content from it;
 (2) say things about the content that aren't content themselves;
 (3) use (2) to guide content production;
 (4) express data structures in a quasi-human-readable form.

For getting people to support device characterizations, XML doesn't
give us much more than (4).  And seems to get in the way, otherwise.
At least when editing it directly.

CSV (*gack*), Java style property files, XML, S-expressions,
some mini-language like my example above, whatever -- as long
as there are nearly-universal  tools that support browsing and
changing the device profiles that don't burn your eyes out.

Syntactically sugared text files tend to win in open source because
everybody already knows (and has) the needed tool - a text
editor - and everybody's eyes are tired from using computers all day.

And that's pretty important if you want people to work for free.

-michael turner
leap@gol.com
Received on Wed Feb 27 05:42:44 2002