Re: Errors in (Dr)Racket
Robby Findler <[email protected]>
| Newsgroups | gmane.comp.lang.racket.user,gmane.lisp.scheme.plt |
|---|---|
| Message-ID | <CAL3TdOMC0J=28EADmM9fDtXt3gXtbN-fDxnDUdF7QsDi1R33NA@mail.gmail.com> |
I mostly agree with Matthias, but wanted to add two things: 1) I've certainly experienced, many times, (both as the producer and consumer (and sometimes simultaneously)) contracts that were added because of runtime errors. But I do agree it is not as common as we had hoped it would be. And Stephen's comments suggest that there is a cultural issue here. So in that spirit, I want to say: please report (as bugs!) code that raises errors down in its bowels instead of at some more natural boundary in the code. 2) there is a technical difference between where the error is discovered and where the contract goes and the error messages generally have both of these components in them. It may be that the error message text isn't clear and these two separate things are getting conflated. (Overall, it is okay if the error is actually discovered in the bowels and this information shows up in the stack trace attached to the error message; the thing Matthias and I are thinking about is whether or not there is a contract that lives at some more reasonable boundary between the library you're using and the code you wrote that uses it.) Regardless, do post these errors. Feel free to ask if they seem to be missing checks or if something else is going on and lets try to build a better culture about getting good error messages! Happy New Year. :) Robby On Sun, Jan 1, 2017 at 12:51 PM, Matthias Felleisen <[email protected]> wrote: > >> On Jan 1, 2017, at 1:17 PM, Stephen De Gabrielle <[email protected]> wrote: >> >> Hi All, >> >> I occasionally write code with errors* that cause the DrRacket error message to link to an internal Racket file, rather than my own incorrect code. >> >> The last time I did this it was doing web server code, but I've also managed it with GUI code.(and playing with DrRacket Plugins) >> >> I've not filed a report (or attempted a patch) on this before, mostly out of embarrassment, but also because because I feel out of my depth in the racket internals and the error was in my own code. >> >> Should I report these when I find them? Should I attempt to work out the cause and attempt a patch? > > > A long time ago, Robby and I conjectured that if people reported those kinds of errors, the creators of libraries would eventually protect their APIs with contracts and the software would become more robust. This ‘gradual hardening’ with contracts did not happen over time. Sure, some people added contracts to libraries, others wrote them in Typed Racket. But all in all, we added contracts because we wanted to not because of ‘client pressure.’ > > Your email is validation that something was wrong with our conjecture, but I can’t figure out what exactly is wrong. The word ‘fear’ and ‘embarrassment’ are suggestive. Perhaps developers are intimidated by the creators APIs and Libraries, because these people must be so much better and can’t possibly make mistakes. > > Well we all make mistakes and if others report them, we get better at overcoming these mistakes (starting with the elimination of bugs). > > Happy New Year — Matthias > > -- > You received this message because you are subscribed to the Google Groups "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] For more options, visit https://groups.google.com/d/optout.