<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On May 5, 2013, at 12:51 PM, Laurent wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, May 5, 2013 at 6:44 PM, Matthias Felleisen <span dir="ltr"><<a href="mailto:matthias@ccs.neu.edu" target="_blank">matthias@ccs.neu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; "><br>
C++ has tried this tack for some time. </blockquote><div><br></div><div>Sounds like it has failed then.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I can see doing for built-ins but how would you go about programmer-created operations? Trust the programmer? -- Matthias<br>
</blockquote><div><br></div><div>Well, I guess some checks can be added, but I don't see the difference between attaching bad properties to a newly created operator and defining a buggy procedure.<br></div></div></div></div></blockquote></div><div><br></div><div><br></div>I think it is one thing to say <div><br></div><div> (define (fahrenheit->celsius f) 32)</div><div><br></div><div>and another to attach "associative" to the floating-point + operator. Since we all write examples first and translate then into test suites before we code, finding a bug in fahrenheit->celsius is straightforward and supported by our support mechanisms. If you don't trust your tests, attach contracts to your procedures because they generalize tests in a natural way. Finding bugs in false claims about functions is much less supported at the moment. Perhaps random testing or model checking or something like that may help along here. </div><div><br></div><div>-- Matthias</div><div><br><div><br></div></div></body></html>