Defects in the regular sequence of atomic planes can be frequently met in crystalline materials. Not rare is the case where type, quantity and sequence of this kind of defects influence the properties and behaviour of the material. As a matter of fact, planar defects modify the distribution of intensity in reciprocal space, introducing peculiar features in the observed diffraction patterns. Throughout the years, methods have been independently proposed in several scientific fields for extracting the stacking information from the diffraction patterns. An historical review of those studies will be given, starting with simple probabilistic approaches and passing through the matrix method, simulations and Monte Carlo analysis, to end with the OD theory and with the extraction and refinement of stacking probabilities directly from a powder pattern. The most relevant finding of the past and possible perspective for the future will be shown and commented.