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

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Mon Dec 12 15:58:44 EST 2005

On Dec 12, 2005, at 3:43 PM, John Clements wrote:

> 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.

You're ripping Carl's answer out of context.

> Mike, what I'm seeing here is a fine programming problem, but not one 
> that is a natural fit for the teachpack model.

Exactly!!! -- Matthias

>  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
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.