Re: data model

David Lee scripsit:

> Imagine this simple practical case.  A Micro XML processor that counts
> the number of tags.  It need not be built upon a fully featured parser.
> Yet it should be considered "conformant" if it produces the right
> answer for any MicroXML document.

I don't agree that it's a conformant parser; it only conforms to its
self-defined goal.  What about a "MicroXML processor" that counts the
number of characters in a MicroXML document?  If that's conformant,
you'd have to say wc(1) is conformant to MicroXML, which is absurd.

> (please don't fall into the DOM trap of defining an actual interface !)

I think defining an interface is a Good Thing.  Sockets haven't suffered
from having a defined interface.  It's just a separate job from defining
an abstract data model.

-- 
John Cowan <cowan@ccil.org>             http://www.ccil.org/~cowan
Sir, I quite agree with you, but what are we two against so many?
    --George Bernard Shaw,
         to a man booing at the opening of _Arms and the Man_

Received on Monday, 1 October 2012 16:37:43 UTC