Whitehead and Russell (1927) devised a hierarchy of ``types'' in order to eliminate self-referential statements from Principia Mathematica, which purported to derive all of mathematics from logic. A set of the lowest type contained only objects (not sets), a set of the next higher type could contain only objects or sets of the lower type, and so on. Unfortunately, Gödel's Incompleteness Theorem showed that both Principia Mathematica and all consistent formal systems must be incomplete.
See also Gödel's Incompleteness Theorem
References
Hofstadter, D. R. Gödel, Escher, Bach: An Eternal Golden Braid.
New York: Vintage Books, pp. 21-22, 1989.
Whitehead, A. N. and Russell, B. Principia Mathematica. New York: Cambridge University
Press, 1927.