Robustness principle
Adapted from Wikipedia · Adventurer experience
In computing, the robustness principle is an idea that helps software be strong and flexible. It says: "be careful with what you send, but be understanding with what you receive from others." This means that when a program sends information, it should follow the rules perfectly. But when it receives information, it should try to understand messages that don’t follow the rules exactly, if the meaning is still clear.
The principle is also called Postel's law, named after Jon Postel. He used these words in an early description of TCP, a system that helps computers talk to each other.
For programmers, this idea helps make programs work well together. It is often described as being contravariant in the input type and covariant in the output type, which helps create compatible functions. This way, different pieces of software can communicate better and avoid problems.
Interpretation
The robustness principle was first written down by Jon Postel in 1979. He was talking about how the IPv4 network should work. Later, in 1989, Bob Braden said that programmers should think about how to handle messages that don’t follow the rules perfectly.
Programs that send information should follow the rules exactly. But programs that receive information should be flexible. They should accept messages that don’t follow the rules perfectly if the meaning is still clear. This helps keep communication smooth even when some parts don’t work exactly right.
Criticism
In 2001, Marshall Rose talked about problems when using Postel's principle to make new programs. He said that a program sending messages that don't follow the rules might work with some programs but fail with others. Fixing these problems can be hard and costly. Rose suggested checking messages very carefully.
In 2018, a paper showed how the principle might reduce privacy for some online services.
In 2023, Martin Thomson and David Schinazi said Postel's principle can make systems less safe. They explained that when programs are too easygoing, mistakes can spread, and all programs need to copy these mistakes to work together. This makes fixing problems difficult.
This article is a child-friendly adaptation of the Wikipedia article on Robustness principle, available under CC BY-SA 4.0.
Safekipedia