[racket] Plot is voracious

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Thu May 22 08:17:03 EDT 2014

On May 21, 2014, at 6:09 PM, Neil Toronto wrote:

> That's the kind of thing I had in mind, but I was also thinking of subtyping-like relations in the exception hierarchy. For example, does it make sense to change a contract to raise a less specific error?

No, absolutely not. The Style Guide recommends to catch the most specific exn-s possible so as not too accidentally mask out others that aren't supposed to be handled. 


> Does it matter?

I follow this guideline, and it isn't mind. (I believe it came from Matthew.) But whoever recommended it (1) is probably doing it too and (2) I found suggestion in other style guides that say similar things. 

So there is some kind of backwards compatibility problem. How large it is, I don't know. 




> At any rate, it seems we might need code to be able to catch and handle different contract violations different ways. Raising only one kind of error is fine when humans are handling them, but programs like Plot are too stupid to read error messages.
> 
> From your response, it seems safe for now to insert another level in the exception hierarchy for math domain errors, so I'll make a bug report about it and assign it to myself.



Posted on the users mailing list.