[plt-scheme] Code for Krishnamurthi's "Swine Before Perl"
Joe Marshall wrote:
>
> You don't. The disadvantages of infix syntax are too numerous.
>
Well, that's kind of in the eyes of the beholder, right? You could argue
about prefix vs. postfix (Forth/postscript) and never get out of a
religious war. I fully appreciate the value of s-expressions but maybe
not everyone else does. Or are you saying that Haskell is broken because
it doesn't use parentheses?
> The data does not need to be in sexp format; it is trivial to write
> programs that can convert ad-hoc data formats to s-exps. I have
> written compilers where the front end parser is a simple tokenizer
> based on lex that wraps parenthesis around the non-schemeish tokens.
Sure, and that's what I've done on other projects. But that implies that
the data ("program source") still has to be essentially in an
s-expression format or some trivial mapping thereof.
>
> Wouldn't it be a whole lot easier to run the XML through XSLT and
> convert the report template to something more Scheme-friendly?
>
Yeah, that's one way to look at it. But I don't think replacing a
"<scheme></scheme>" pair of tags with a pair of parentheses is going to
be sufficient.