[racket-dev] Blame and re-provided bindings

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sat Jan 15 12:32:31 EST 2011

On Sat, Jan 15, 2011 at 11:29 AM, Stevie Strickland
<sstrickl at ccs.neu.edu> wrote:
> On Jan 15, 2011, at 12:26 PM, Stevie Strickland wrote:
>> On Jan 15, 2011, at 12:19 PM, Robby Findler wrote:
>>> I think that we are just throwing up stumbling blocks. It is really a
>>> design choice (does a reprovide "carry over" the contract or does it
>>> put a new one on there?) and I seriously doubt there are any places
>>> where someone does a reprovide intending to change the contract in
>>> this manner. To the contrary, I expect that nearly every place where
>>> someone does a reprovide, they indented to use the exact same contract
>>> (with different parties now).
>> This is possible, but _which_ parties?  Do you wish to export internals through an external interface that should now take on the positive blame, so that you don't leak your internals (via module names and such used as blame parties)?  This seems to me what you'd want for something like redex, but this requires more work, since you need to change the positive blame.  This would require reapplying the contract projection to the original (pre-wrapped) value but different blame parties, which is more expensive and thus should be explicit, or some thought into how to engineer the contract system to make this possible without needing to reapply the projection.
> Actually, if this is only allowed before the value is used (i.e. on straight reprovides of a contracted identifier), then we might be able to store some syntax-time information and recreate the syntax transformer appropriately.  So perhaps it wouldn't be as expensive as I originally thought, though it still seems that changing the positive blame information should be an explicit operation, and I think it's really what you want here.  I'll keep thinking about this, though.

Oh, good point! That would solve both of Carl's objections, I believe.

But I don't think we should think of it as 'changing the positive
blame information' -- I agree anything phrased like that sounds wrong.

Instead, I think we should be thinking "what is (provide f) shorthand
for?". In the past I argued it was shorthand for "(provide/contract [f
any/c])" but now I think that maybe we should be thinking of it as
"(provide/contract [f

Does that make more sense?


Posted on the dev mailing list.