[plt-scheme] Contracts on Libraries

From: Robby Findler (robby at cs.uchicago.edu)
Date: Sat May 26 15:07:36 EDT 2007

On 5/26/07, Carl Eastlund <cce at ccs.neu.edu> wrote:
> I concur: contracts are a good thing.  They're helpful for bug-finding
> at all stages of development. As long as you don't put a linear-time
> contract on a log-time operation (or something similar), efficiency
> shouldn't be too bad.

If you do run into the situation where you find a contract on a data
structure is important, but the contract requires traversing the data
structure, do check out define-contract-struct. It will lazily check
the data structure as the program traverses it (but it has a fairly
high constant overhead, so it isn't for all jobs).


Posted on the users mailing list.