Run-time type information

In computer programming, run-time type information or run-time type identification (RTTI)[1] is a feature of some programming languages (such as C++,[2] Object Pascal, and Ada[3]) that exposes information about an object's data type at runtime. Run-time type information may be available for all types or only to types that explicitly have it (as is the case with Ada). Run-time type information is a specialization of a more general concept called type introspection.

In the original C++ design, Bjarne Stroustrup did not include run-time type information, because he thought this mechanism was often misused.[4]

  1. ^ Sun Microsystems (2000). "Runtime Type Identification". C++ Programming Guide. Oracle. Retrieved 16 April 2015.
  2. ^ "Language support library [support.rtti]". eel.is. Retrieved 2021-07-13.
  3. ^ "Object-oriented programming". learn.adacore.com. Retrieved 2021-07-13.
  4. ^ Bjarne Stroustrup (March 1993). "A History of C++: 1979—1991" (PDF). Bjarne Stroustrup. p. 50. Retrieved 2009-05-18.