[racket-dev] contracts not okay?

From: Asumu Takikawa (asumu at ccs.neu.edu)
Date: Thu Jul 12 19:57:10 EDT 2012

On 2012-07-12 19:38:44 -0400, Matthias Felleisen wrote:
> > | I updated and noticed that this was now failing because interface
> > | contracts are not check structurally (any more?).

I don't think this is a case of checking structurally or not. It is
not valid, for example, for the following behavioral subtyping to
  (-> number? boolean?)
  (-> number? [number?] boolean?)

since the former cannot be used in contexts that expect to apply the
optional argument (using imaginary contract notation where [...] means

You might want this to be okay in the other direction (though interface
contracts will currently not allow it).

> > | Should I change the documentation or is
> > | this a bad backwards incompatibility with the older versions?

I don't have an opinion on this since I'm not too familiar with
gl-context<%>s. I wrote the contract based on the documentation.


Posted on the dev mailing list.