Postel’s Law is a clever bit of social engineering. Also known as the Robustness Principle, it goes like this:
Be conservative in what you do, be liberal in what you accept from others.
Postel addressed this advice to the engineers who built the early Internet from scratch, an arrogant bunch. To such a crowd the underlying message is:
I’m sure you’re going to get this right, but you’ll have to interoperate with the implementations of others with lower standards. Do you really want to deal with those fools? Better to silently fix up their mistakes and move on.
(Keep this in mind the next time you come across an adherent of Postel’s Law, and I think you’ll find it illuminating.)
Beyond the social engineering, Postel’s Law is good because it empowers people to build mostly-working complex networked systems without coordinating with others or asking anyone’s permission. It’s as if Postel anticipated what we now recognize as a fundamental property of the Internet, and applied it to building the Internet itself, in some kind of crazy paradoxical bootstrapping process. Genius.
The irony of Postel’s Law is that while it boosts interoperability in the common case, it causes incompatibilities at the margins. According to Postel’s Law, if your implementation receives an out-of-spec message, it is supposed to “be liberal” and try to make sense of it. The problem is that every implementation is liberal in a different way. So, two implementations can interpret the same message in entirely different ways! At Internet scale, this becomes a big problem.
Nowhere is this more evident than with HTML, the supposed poster-child for Postel’s Law. HTML is wildly successful, but in practice web designers spend a lot of time and effort making sure that their design will work properly in spite of browser incompatibilities.
The next version of HTML, HTML5, should considerably reduce the problem of browser incompatibilities. It does this, in part, by rejecting Postel’s Law for browser implementors. Instead of allowing browsers to be liberal when dealing with “flawed” markup, HTML5 requires them to parse it exactly as in the HTML5 specification, and that specification is given much more precisely than before, in the form of a deterministic state machine, in fact. HTML5 is trying to give implementors no leeway at all in this, in the name of browser compatibility.
In other words, if you are writing a browser, an HTML5 producer or transformer, or are simply writing HTML5 by hand, then Postel’s Law is not for you. Considering the overwhelming advantages of increased browser compatibility, I expect this will be welcomed rather than rejected by the community. If so, it will be a strong indication that HTML’s success is independent of Postel’s Law.