[plt-scheme] Organizing Code

From: Kevin A. Smith (kevin at hypotheticalabs.com)
Date: Tue Mar 7 19:47:47 EST 2006

I'm looking for a bit of wisdom from the seasonsed Schemers community. 
How do you organize code for large(ish) projects?  The project design 
I'm considering has the following properties:

* Modular design with many specialized modules and a "glue" layer 
comprising the main app.

* Each module provides public code used by the rest of the application. 
This code may be functions, Swindle/CLOS methods, or Swindle/CLOS classes.

* Each module will also have private code used internally and not meant 
for public consumption.

* I'd like to have the flexibility for modules to span multiple source 
files. This is not a hard requirement but a very nice to have.

I'm coming from a Java/C++ background and am struggling a bit in finding 
the Scheme-y way to do this. I'm most used to the packaging structures 
in Java where multiple files participate in a single "logical" package. 
Classes and methods can be public, package-private, or private. Is there 
anything similar to this in Scheme, specifically PLT Scheme? Modules do 
not seem to fit the bill as they cannot span multiple files and the 
current version of package.ss is broken.

I readily admit that my ingrained Java coding habits are most likely 
blinding me to either obvious or alternative solutions. I am not so much 
concerned with how the packaging structure works, just that there is a 
packaging structure and common practices surrounding it.

Thanks,
Kevin


Posted on the users mailing list.