[plt-scheme] Looking for suggestions on how to approach an issue

From: Grant Rettke (grettke at acm.org)
Date: Thu Sep 17 23:08:38 EDT 2009

On Thu, Sep 17, 2009 at 5:53 PM, David Storrs <david.storrs at gmail.com> wrote:
> Now that we have a working prototype, we would like to add contracts
> to guarantee the correctness of data passed into and out of our
> read-data and write-data routines.  But contracts only apply across
> module boundaries.  Since the call to 'new' is within the module where
> the read / write calls are made, we don't see how to make this work.

Start by moving your object instantiation to a module whose only
purpose is to facilitate said instantiation, and contract that
function. That way you can get what you want without re-architecting
(yet). Is that too simplistic?

Posted on the users mailing list.