[plt-scheme] Relation to r6rs?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Aug 11 08:42:12 EDT 2008

At Mon, 11 Aug 2008 11:09:16 +0200, Michael Schuerig wrote:
> I've been reading the PLT Scheme guide and r6rs more or less in parallel 
> and at times I've been scratching my head. Specifically, I don't 
> understand how libraries (r6rs), modules (plt) and units (plt) are 
> related.

Libraries and modules are the same sort of thing.

A unit is another layer of abstraction and indirection. The difference
between a module and a unit is similar to the difference between

 (+ x 3)


 (lambda (x) (+ x 3))

The former adds 3 to `x' in the context of a specific `x', while the
latter gives you a function that lets you pick `x' later and that can
be used multiple times in the same program with different `x's.

A unit is similarly a kind of module that is parameterized over its
imports, so someone can choose specific imports later, and the unit can
be used multiple times with different imports in the same program.

> Is there some general advice for writing/structuring code so that it is 
> standard-conformant and portable and at the same time makes good use of 
> what PLT Scheme provides on top or r6rs?

I'll leave this question to others who have tried it.


Posted on the users mailing list.