Subject: Re: Alternative *ML syntaxes From: Erik Naggum <erik@naggum.no> Date: 19 Nov 2002 02:40:40 +0000 Newsgroups: comp.lang.lisp Message-ID: <3246662440604710@naggum.no> * Henrik Motakef | I don't know if you consider this an "actual case" because I think it's | unlikely that you use it, but I still hope that you'll explain: What is to explain? The fact that these are interchangeable just proves my point. | However, you'll have to decide which syntax to use at some point, and I | think this is actually /harder/ when only one choice is valid - do you | really have explicit rules that tell your translator that "href" is an | attribute of "a", not a child element? There already /is/ an explicit rule to tell me that! | Do you use a DTD at some point (which, after all, doesn't have to exist)? If there is no DTD, I am frankly not particularly interested in it. SGML (and XML) without a DTD is like writing Lisp code without specifying the package in which you are supposed to read the source. Assuming that the code is intended for the Common-Lisp package or some package using it, may appear to be a reasonable choice to people of exceptionally little awareness of other possibilities, but if they complain that other people did not "get" the package they were intended for when it was specified some other place in "plain text", I believe patience is wasted on dealing with such people. | I'm afraid, however, that I didn't get your point that "Attributes stem | from the notion that there is a useful distinction between users of the | contents of elements". Care to explain? The original idea with attributes was that you should be able to remove everything between < and > and whatever you wound up with would be the "real" contents of the document, as a sort of "pleaser" for those who had objected to all the garbage they had to type. That is, there would be a human user of the document's "real" contents and a program user of the stuff between < and >. | ([...] In the last case, James Clark (IIRC) once mentioned how building a | parser for the compact (non-XML) syntax was way easier then implementing | the SAX-based XML version...) Because of the massive amount of noise that XML parsers introduce to the reading application and the immense failure of the *ML community to grasp the simplicity of the Lisp `read´ function, the internal representation of SGML and XML is so underspecified as to be essentially absent. Because these languages were designed to deal with a processor that kept track of a relatively small number of state changes at the edges of elements (i.e., their start- and end-tags) and then passing information straight through, not for storing information in memory for later processing, the whole idea of using an edge detector when you need the real information is ludicrous. As for actually storing information that can be processed intelligently both from a stream and from a random-access medium like a file, I have come to favor ASN.1 over all this tag soup. The dream of locating and retrieving fargments of information from large documents with various forms of silly path specifiers is so dumb in the parse-the-stream world of SGML that all the work I did with HyTime showed me how nutty the syntax was and how much smarter the "evil competition" was. *sigh* -- Erik Naggum, Oslo, Norway Act from reason, and failure makes you rethink and study harder. Act from faith, and failure makes you blame someone and push harder.