S2 - a Scheme to Scheme Compiler

The greatest complaints about Scheme (aside from people with inadequate minds and editors whining about parenthesized prefix notation) are that the standard (R5RS) lacks a module system and that the library functionality is entirely inadequate. While these observations are correct on the surface, they are incorrect in actual practice.

In point of fact, the observation about the module system is untrue. R5RS does provide all of the facilities of what any reasonable (defined as someone who agrees with me) person would call a module system. They just aren't packaged very nicely and most Schemes have more tractable code modularization mechanisms built into them, ranging from the familiar (Bigloo or SLIB) to the category-theoretical (PLT and Scheme 48). However, none of these have been standardized, and they all have their advocates (and advantages).

The same is true for the library situation in Scheme. Given that the usual Scheme standardization process was breaking down over these issues, the R5RS authors decided to convene a new process for quasi-standardizing these non-essential features. Any such peripheral feature would be called a Scheme Request For Implementation (or SRFI), in much the same way that the internet standards were developed through a "Request For Comments" process. In effect the R5RS authors decided to let interested communities develop their own standards, while leaving the core language to the minimum that every one could agree on.

SRFI support is spreading, but it is neither uniform or ubiquitous. S2 uses the SRFI-0 machinery to achieve a high level of portability for Scheme code. It certainly seems to work, as the S2 source code runs on five different Scheme implementations.


Mini Status

Hey, I've got a day-job, too, you know? Sometimes things don't move as fast as I'd hope. Here's a thumbnail sketch of the latest and greatest:

  • Latest diary entry: 1-July-2003
  • Benchmark pages added showing the comparative results of various Schemes in both running S2 and other programs.
  • New page containing excerpts from the mangler code that I have been re-using frequently in my other projects.

  • A stable (no guarantees of reliability or fitness for purpose) release is available via anonymous CVS at:

    cvs -d :pserver:anonymous@cvs.mangler.sourceforge.net:/mangler co -r stable src


Use XEmacs! SourceForge
	Logo
David Rush
Last modified: Tue Jul 1 22:08:41 IST 2003