[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Htdp: Contracts



My thesis is tackling related issues. I am not sure that I will get an
implementation done for DrScheme before I leave these hallowed halls,
but there is some chance.

Robby

Brent Fulgham wrote:
> 
> While glancing through the "How to design programs" web-book, I noticed
> the frequent use of a "Contract" notation at the top of code snippets.
> (I also have seen this in some of the Scheme code linked from elsewhere
> on the PLT site).
> 
> Does notation of the form:
> 
> Type Type -> Type
> 
> or
> 
> Type Type -> Unit
> 
> Indicate any future plans for an Eiffel-style design-by-contract
> mechanism within MrEd and friends?
> 
> I think the functional approach to programming greatly reduces the
> incidence of some forms of contract violation, but a good mechanism
> of establishing pre/post conditions would be a pretty useful tool.
> 
> (Of course, there would be far less need to label invariants since
> most Scheme values are by definition invariant :-)  The use of
> the "bang" notation does help warn you when something might be
> changed unexpectedly...)
> 
> -Brent