Subject: Re: XEXPR needs Schemers' help
From: (Rob Warnock)
Date: 30 Dec 2000 07:07:12 GMT
Newsgroups: comp.lang.scheme
Message-ID: <92k1j0$jbo29$>
Barry Margolin  <> wrote:
| I agree.  XML syntax is horrible.  People who program in more conventional
| languages complain about all the parentheses in Lisp syntax, but XEXPR is
| even worse with all its angle brackets.  Compare:
|     (define (square x)
|       (* x x))
| with:
|     <define name="square" args="x">
|       <multiply><x/><x/></multiply>
|     </define>
| You can barely see the variables in all that </> garbage!

Heh, heh! You haven't even scratched the surface, Barry! Your suggested
syntax breaks down when more complicated functions and expressions have
to be used. I took a try at this a while back, and the best I could come
up with that was in the spirit of XML as a "structure" representation was
to make the major tags be the basic forms of Scheme, and then have subtags
for *every* subform, so you can have lists of them. E.g.:


Artificially ugly? I don't think so. Consider defining procedures of
more than one argument, or variadic procedures, or anonymous procedures
(lambdas), and then consider things like cond & case, and procedure calls
with general expressions in the operator position, etc. The only way I
can think to "clean it up" is to drop the structural information altogether,
and make whitespace significant (both of which violate the "spirit of XML"
as I understand it):

	<list>define<list>square x</list>
	  <list>* x x</list></list>


Rob Warnock, 31-2-510
SGI Network Engineering
1600 Amphitheatre Pkwy.		Phone: 650-933-1673
Mountain View, CA  94043	PP-ASEL-IA