[racket-dev] Blame and re-provided bindings
On Jan 14, 2011, at 5:24 PM, Casey Klein wrote:
> FWIW, I had no idea what the message's "via" clause meant.
Truthfully, I was guessing that "via" => "user blame". If I didn't know the internals, I wouldn't have known what that meant either. I think it needs to be rewritten, but I haven't thought about how I'd rewrite it yet, though.
> I recognize that "blaming x" has a particular technical meaning, but
> the emphasis in the phrasing seems backwards -- the "via" module
> sounds like an innocent bystander to the "blaming" module's mistake,
> but it's precisely the other way around.
Well, it _is_ an innocent bystander if you take the "no contract is equal to contract with any/c" viewpoint. The "blaming" module never told the "via" module that there was a contract (and thus the effective contract was `any/c'), and thus there was no reason for the "via" module to think that using the value in the way it did was incorrect.
> Regardless, though, I still think we need some way to re-export a
> contracted value that makes the re-importer the negative party on the
> contract.
I'm not necessarily in disagreement, but currently I think this should be an explicit action. In fact, there's another operation I'd like: "re-export this with the same contract (without redescribing it) and treat _me_ as the positive party and whoever later enters into this as the negative party." This would be useful for collections, where some internal, private module defines and contracts the value initially, but you don't want the information about the internals to leak out when it's reprovided to the world at large through the public interface.
Stevie