[plt-scheme] Using student-defined structures in a teachpack

From: John Clements (clements at brinckerhoff.org)
Date: Mon Dec 12 15:43:48 EST 2005

On Dec 10, 2005, at 11:15 PM, Carl Eastlund wrote:

>
> This seems like a very bizarre thing to ask them to do.  It has
> nothing to do with any coding practice anyone will have to do - you
> never have to write a data definition with the requirement that it fit
> code already written based on assumptions about it.  Perfectly valid
> solutions (changes in structure or field name, or reversed field
> order) will yield errors instead of working.

Huh?  AFAICT, this is the very _essence_ of component-based programming.

Mike, what I'm seeing here is a fine programming problem, but not one  
that is a natural fit for the teachpack model.  It looks to me like  
you want the library code to depend on the student's code.  I see two  
solutions:

1) turn the code into units.  Then, the teachpack might provide a  
function, "link-up", that links the user's unit implementing the  
point with the library code that wants to use it.
2) Dump the teachpack approach, and just write library code that  
depends on a module that the user must provide.

I agree completely with Carl that you almost certainly _don't_ want a  
hygiene-breaking solution like the one you seem to be proposing.

John

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2430 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20051212/bc144659/attachment.p7s>

Posted on the users mailing list.