[plt-scheme] parameterize modules

From: Dave Gurnell (d.j.gurnell at gmail.com)
Date: Tue Oct 3 05:54:43 EDT 2006


Another possible solution: use the object system, create an interface  
for the functionality you want to provide, and write classes to  
implement it in different ways.

I don't want to state a preference either way... I'm sure there are a  
separate rafts of arguments for using each approach over the other.

Moving on, my experiences with units and signatures are similar to  
Noel's, with a couple of extra observations:

   - DrScheme doesn't have great support for units/signatures (for  
example there's no "check syntax"
     functionality... I guess there are obvious reasons for this if  
you think about it, but I thought
     I'd point it out);

   - consider carefully the interface between the unit-oriented and  
non-unit-oriented code in your
     program, as if you're not careful you may have to wrap units  
around a lot of code you didn't
     want to.

It would be cool if the unit/sig system could be integrated (a) more  
tightly and (b) with cleaner syntax into the module system. I don't  
know how plausible this is or whether it cause problems with the  
basic operation of non-unit-oriented code.


-- Dave

> I think you want units:
> http://docs.plt-scheme.org/mzlib/mzlib-Z-H-50.html#node_chap_50
> The syntax is a PITA, but once you get used to it, it works
> well (modulo hygienic macros -- anyone feel like answering
> our question about this?)  Scott Owens is apparently
> working on new syntax, so apply (gentle) pressure on him to
> speed its completion :)
> N.

Posted on the users mailing list.