wordfor

Postel's law

(POS-tulz LAW) noun

  1. The design principle that software should be conservative as to its own behaviour (i.e. strictly compliant with specifications) but liberal in the behaviour it tolerates from other systems. The parser accepted three date formats, following Postel's law, and the exporter emitted only one.

Origin

Named after Internet pioneer Jon Postel (1943-1998).

In practice

Apply it to APIs and file formats: emit output that follows the specification exactly, and accept reasonable variation on input. Log what you tolerate so the leniency stays visible.

Say to your AI

Review this API handler against Postel's law. Make the input parsing tolerant of the common variations, keep the output strictly to spec, and log every variation accepted.

In plain words

  • send strictly but accept loosely
  • be tolerant of what you receive
  • strict output, forgiving input

See also design by contract Linus' Law Conway's law Wirth's law

Adapted from Wiktionary (CC BY-SA 4.0).

Find similar words