[plt-scheme] using xml syntax for programming in scheme

From: Corey Sweeney (corey.sweeney at gmail.com)
Date: Thu Jun 21 14:33:37 EDT 2007

I had a idea.  If some people think that XML is a easier syntax (which
I disagree with, but whatever), then they might like to use XML syntax
in programming.  (especially since everyone already understands the
syntax from doing web pages.)

I tried it, and here's what I got:

I used: (display-xml/content (xexpr->xml exp))

and  (lambda (c d) (+ d (* 8 c)))

becomes:
<lambda>
  <c>&d;
  </c>
  <+>&d;
    <*>&#8;&c;
    </*>
  </+>
</lambda>



However:
(lambda (n m) (lambda (s) (lambda (z) ((n s) ((m s) z)))))

becomes:
. . user.edit-function.scm::17339: srep->attribute: expected (list
Symbol String) given (m s)


Is there a standard mapping for this, or would this be a large effort
on my part to map s expressions to the xml standard?  (I don't
actually know the XML standard, i use S-expressions.  This would be
for people who don't know about S-expressions)

Corey



-- 
((lambda (y) (y y)) (lambda (y) (y y)))


Posted on the users mailing list.