<div dir="ltr">Hi Matthias<div><br></div><div>Thank-you for your sage advice:</div><div><br></div><div>On Tue, Sep 3, 2013 at 11:54 PM, Matthias Felleisen <span dir="ltr"><<a href="mailto:matthias@ccs.neu.edu" target="_blank">matthias@ccs.neu.edu</a>></span> wrote:<br>
</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
1. Always use contracts that cannot be expressed as types<br>in an obvious type system.</blockquote><div><br></div><div>I'll work on my examples. I may also throw in an example in typed racket to show the types and contracts working together.</div>
<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">2. Show a higher-order contract and flavors that push this<br>
idea hard. Consider using d/dx or indefinite adaptive integral ...<br></blockquote><div><br></div><div>I'm a little bit wary of showing (only) a calculus-flavoured example because I don't want to give the impression that the higher-order contracts are just for mathematical applications.</div>
<div><br></div><div>I'll try to come up with / search for a more "down to earth" example, but if anyone has a practical, non-math, suggestion handy, please point me to it!</div><div><br></div><div>I confess that as I have been learning about higher-order contracts I wondered whether (instead) types + flat-contracts would suffice in practice as a worse-is-better compromise.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">3. For the smack-down, contracts tend to reveal some things that<br>
are "intensional" (part of the implementation). </blockquote><div><br></div><div>Sounds bad for information hiding. What's an example of this?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Also, contracts<br>can easily shift the algorithmic complexity if you're careless.<br>See binary-search but impose sorted? as a predicate on the vector<br>that flows into the function.</blockquote><div><br></div><div>
Makes sense. I'll add it.</div></div><div><br></div><div class="gmail_extra"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Good luck -- Matthias</blockquote><div> </div><div><br></div><div>Thanks!</div><div><br></div><div>Dan </div>
</div></div>