3 ms·
Postel's Law never sat quite right with me. > Be conservative in what you send, be liberal in what you accept. The first half makes good sense. You should mak
by MaxBarraclough 6y ago
Postel's Law never sat quite right with me.
> Be conservative in what you send, be liberal in what you accept.
The first half makes good sense. You should make efforts to ensure your program is producing well-formed output. That's just a statement of software quality.
The second half is dependent on the problem domain. A web browser should do its best to cope with malformed input, sure. An Ada compiler should not, as an important part of its job is to reject erroneous inputs. Similarly, part of the value of XML schemas is to (at least partially) automate the process of detecting invalid data, perhaps so that bad requests can be rejected.
edit Turns out others have spent more time thinking about this than I have: https://en.wikipedia.org/wiki/Robustness_principle#Criticism https://en.wikipedia.org/wiki/Robustness_principle#Criticism