Subject: Re: Alternative *ML syntaxes [was: Re: StudlyCaps ]
From: Erik Naggum <>
Date: 18 Nov 2002 00:11:46 +0000
Newsgroups: comp.lang.lisp
Message-ID: <>

* Rob Warnock
| Anyway, I'm curious as to what you used with the \foo{...} and {foo ...}
| syntaxes to represent attributes...

  I have explained this here previously, but it bears repeating.  There are
  no attributes.  Attributes stem from the notion that there is a useful
  distinction between users of the contents of elements, but it is not
  useful to separate the users.  If the syntax for elements is supposed to
  be good enough for the users, it should be good enough for the language
  designer, to put it succinctly.  Few language designers, however, are
  willing to live with the decisions they force on their users.  Common
  Lisp is one of few languages that do.  (And of course some of the people
  who do not grasp the elegance of this now want different syntax for the
  "real" language constructs.  This kind of fluctuation between good and
  bad ideas is to be expected as the good ideas are taken for granted and
  ignorants have to reinvent the bad ones from time to time, like the tree
  of liberty must be refreshed from time to time with the blood of patriots
  and tyrants.)

  So where you have an attribute, I have an extra element.  <foo bar="zot">
  ...</foo> becomes {foo {bar zot} ...}, which saves not only on the amount
  of syntax involved, but on the mechanisms used to protect characters from
  misinterpretation, primarily because the number of characters that need
  to be protected is also dramatically reduced in number and a single \ can
  be used both to escape {}\ and to introduce named entities instead of
  clobbering the normally useful characters <>&, and also does not require
  names for the characters used in the markup.  In fact, if you cannot find
  the character in Unicode, you should reconsider using it.  Consequently,
  \entity should be used for external references.  SGML's parameter entities
  were a major design mistake and are better solved with real macros.

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.