[plt-scheme] Code for Krishnamurthi's "Swine Before Perl"
Shriram Krishnamurthi wrote:
>
> Have you considered writing some macros instead? That way you can
> better check the syntactic structure of inputs you send to
> Mathematica...
This brings up a point I would like some opinion on -- when designing a
"little language" when do you decide to move from s-expression based
syntax to using parser tools to lex other expression syntax? For
example, the automaton data example is wrapped in an s-expression which
makes it trivial for Scheme to read but doesn't really add any value to
the data itself.
One of my projects uses mzscheme to generate reports from XML - the
report template is written using Scheme syntax within CDATA tags. This
is not a happy marriage. I'm reworking this to make the syntax more
XML-friendly (yeah, I know, but I don't control the data source here...)
somewhat like BRL but focused to our requirements. So AFAIK my "little
language" can't merely rely on Scheme macros to do the transforms but it
certainly can use them to define interesting functionality.
--
Patriotism is your conviction that this country is superior to all
others because you were born in it.
George Bernard Shaw