First, it was important to include macros in Better Scheme because of the great power they provide. Further, there would be no nice let
etc.
Several possible forms of macros were considered during the course of designing Better Scheme. They were:
if
. In addition, the argument evaluation could be avoided as needed for macros involving variable names. However, a way to selectively evaluate subparts of unevaluated expressions was needed. The idea of allowing the decomposition of a lazy evaluated argument into lazy evaluated subparts was considered, as were many other possibilities but no satisfactory solution was found.Hygienic macros were adopted. However, they are changed from Scheme to make them first class values and their syntax is more symmetric with functions. There is no good reason Scheme's macros aren't first class except that it would be hard to compile. Better Scheme is meant to be interpreted and so isn't as concerned with that. Hope is still held out that some sort of flow analysis will allow Better Scheme to be compiled even in the face of first class hygienic macros.
jwalker@cs.oberlin.edu |