Comment 10 for bug 322486

Revision history for this message
Gary Poster (gary) wrote :

To Stephan: While I doubt he wants his IRC opinion to be canon, the co-worker with whom I consulted is the author of the O'Reilly REST book. We are in fact working in exactly the manner that you describe. The question is not whether one should be able to define codes as needed, but whether unusual or exceptional codes should need to be declared explicitly before use. I liken it to using string constants in your code, rather than typing out the strings each time. Sometimes those kinds of seatbelts are appropriate, and sometimes not. I feel that this is one of those times, and you don't, so we're asking others for opinions.

To Shane's alternative suggestion: to make passing an integer be the "trust me I know what I'm doing" flag seems not very discoverable or intuitive to me. If passing '200' were not already acceptable (i.e., we could make passing string status codes an error) I might feel differently, because then using an int would not be a flag but the API. With our current legacy, I'd prefer Stephan and Paul's approach over this one.