[racket-dev] Blame and re-provided bindings

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sat Jan 15 06:53:18 EST 2011

On Fri, Jan 14, 2011 at 9:13 PM, Carl Eastlund <cce at ccs.neu.edu> wrote:
>> I think that most of the time that you re-provide something you really
>> wanted to put the same contract on it, so it seems like we should make
>> that easy.
>> Robby
> On the other hand, that means the number of requires and provides can
> seriously impact a program's performance if a function has a
> computationally intensive contract.  I don't think we really want to
> put hidden "gotchas" into the module system.

The contract system should be able to be smart enough to avoid putting
the redundant contracts on. After all, they are eq? to each other
(altho I agree some care will have to be taken to make sure this

> Also, I occasionally make use of the fact that re-provides are
> considered "the same binding" by the module system.  So if A exports
> X, and B re-exports that X, C can require both A and B.  The duplicate
> import of X doesn't cause an error because it's the same X.  Changing
> module exports is a little bit easier because of this -- for instance,
> more than once I have used this property to keep (planet cce/scheme)
> compatible with changes to the core that added overlapping bindings.
> Adding a new contract means you suddenly have a different binding,
> which can be less convenient.

Wait a sec: I don't see how 'the same binding' can be on the table for
one option and not the other? It seems like 'the same binding' in the
current world can do two different things (specifically either include
the 'via' message or not when there is an error).

I tried this out with racket/load and the bindings were the same, but
there was no via message. Maybe that is just part of the bug we're
dealing with, tho?


Posted on the dev mailing list.