[racket] Sweet expressions; or making it easier to introduce Racket to me and my coworkers :-)

From: Norman Gray (norman at astro.gla.ac.uk)
Date: Thu Jul 21 12:23:29 EDT 2011

Eli, hello.

On 2011 Jul 21, at 16:01, Eli Barzilay wrote:

> 5 minutes ago, Norman Gray wrote:
>> A while ago, I spent a little while on an alternative input syntax
>> for XML <http://nxg.me.uk/dist/lx/> which parsed (for example) XSLT
>> in an s-expression syntax, and produced SAX streams for consumption
>> by conventional Java XML tools.
> One big problem with this is dealing with the contents -- if it's
> plain string syntax, then you introduce an extra quotation level
> headache. 

(p "That would certainly be a big problem if one were using this to write extended text (if I'm understanding you \"correctly\").")

<p>For that, normal XML syntax, with more content than markup, works fine, and @scribble works better.</p>

The target 'XML' was things like XSLT or RDF, which had more markup than content, and I never really encountered quoting problems of that type.  That is, this was aimed at XML being used as programming language syntax, not markup of text.

The real weakness is in XPath expressions, since in XML syntax they are defined to inherit the namespace declarations of the XML around them (as an extension to the XML model), but in this Lx syntax, a subset of extended namespace declarations were invisible to the XPath expressions.

All the best,


Norman Gray  :  http://nxg.me.uk
School of Physics and Astronomy, University of Glasgow, UK

Posted on the users mailing list.