[R6RS] Core/library split: `syntax-rules'

Anton van Straaten anton at appsolutions.com
Thu Aug 3 12:50:08 EDT 2006

Michael Sperber wrote:
> Anton van Straaten <anton at appsolutions.com> writes:
>>>Shouldn't we have `syntax-rules' in the core?
>>Since there are already two essentially independent macro systems in
>>R6RS, and since implementations provide other systems, I didn't think
>>any single system should be imposed at that level.
> Independent?  I thought `syntax-rules' is trivially defined in terms
> of `syntax-case'.  

Defmacro is also trivially defined in terms of syntax-case...

> I see it as a simple more foolproof interface to
> `syntax-case'.

Sure.  What I meant by "essentially independent" is that syntax-rules 
can be, and has been, implemented independently of syntax-case.

The reason that's relevant here is that although it may make a lot of 
sense to use syntax-case as the native macro system for an 
implementation, other choices are also possible, particularly in light 
of one of the R6RS guiding principles, "allow researchers to use the 
language to explore the design, implementation, and semantics of 
programming languages".

Requiring syntax-rules in the core makes less sense if an implementation 
chooses to use something other than syntax-case as its native macro system.


More information about the R6RS mailing list