Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sysinst split project - The Configuration File

On Mon, Dec 14, 2009 at 05:57:42PM -0600, David Young wrote:
> You will have to give an example of this "repugnant feature," because
> your description does not ring a bell.  Taking a wild guess, you're
> stuck on some degenerate case involving entities.

Um, no.  Consider what you must do to actually understand the structure of
the data (regardless of their types) in these two cases:

Case 1: vaguely C-like syntax

        thing = { { 1, 2, 3, 4, { 5, 6} } }

Case 2: XML-like syntax -- with a huge artificial advantage because I've
        neatly indented it.


Or, more hideously encoded (but no worse than the unindented C-like
syntax I give above):

        <thing> <element-list> <element>1</element>  <element>2</element>
        <element>3</element> <element>4</element> <element-list>
        <element>5</element> <element>6</element> </element-list>
        </element-list> </thing>

Consider that that is no "worse indented" than the C-like syntax above but
it is fiercely difficult to parse unles neatly indented as I did just above.

The problem is that to find the boundaries of the tokens, in the XML syntax,
which is a syntactic operation of a kind easily automatized by the visual
system in human readers, you have to *actually do relatively high level
cognitive functions* because you have to *read the names of the types*.

In other words, XML requires you to process data-type information just to
do what is usually an earlier step of data interpretation, merely visually
locating the tokens themselves.

I find that stupid and repellent.  And it's not a weakness which is shared
by other data encoding formats like YAML or JSON which have the other
desirable properties of XML.

XML is fine for parsing by machines.  I encourage its use in such
applications in NetBSD, if for no other reason than that we've got nothing
better.  Please do not inflict it upon human beings.


Home | Main Index | Thread Index | Old Index