Tuesday, March 29, 2011

Syntax puns considered harmful (well, not really)

Schemers use the word "syntax" to mean at least two (and maybe even three) different things:
  • in DEFINE-SYNTAX and LET-SYNTAX, syntax means macro expander
  • in SYNTAX and QUASISYNTAX, syntax means code
  • in BEGIN-FOR-SYNTAX, syntax means compile-time (although it's debatable whether this use of syntax is really different from the first one)
There is a certain elegance in that, but in the end it's also a bit silly.

And it's problematic, as the (awesome) paper Languages as Libraries shows: because LET-SYNTAX is already taken to mean "locally bind a macro expander", they have to use WITH-SYNTAX to mean "locally bind a piece of code".

No comments: