Type safety

Type safety refers to the state ( program execution ) at which the data types are used in accordance with their definitions in the language used and any type of injury can occur. Become accordingly type error is detected later than at run time, it is called " type-safe languages ​​". Establish type safety is the responsibility of the compiler or interpreter.

As a type test (english type checking ) is defined as doing the procedure to examine the use of data types within the type system to detect any type of injury. Here, the types involved need not necessarily be identical example in assignments because integers can be assigned to float variable circumstances. The types involved should but at least be assignment-compatible. Some programming languages ​​have a strict type checking thus impossible that the result type of an operator or a function is not clearly defined, such as the division operator in the C programming language or the operator overloading in object-oriented programming.

In the typed languages, there are those with type tests during compilation ( statically typed ) and those in which type tests take place primarily at runtime ( dynamically typed ).

  • Data type
  • Compiler
  • Vulnerability
787846
de