Type System
In programming languages, a type system is a set of rules that assigns a type property to different constructs of a computer program, such as variables, expressions, functions, or modules. These types formalize the implicit categories used by the programmer for algebraic data types, data structures, or other components. The main goal of a type system is to reduce the possibility of bugs in computer programs by defining interfaces between different parts of a program and checking that they are connected consistently. This checking can occur statically (at compile time), dynamically (at run time), or as a combination of both. Type systems have other purposes, such as expressing business rules, enabling certain compiler optimizations, allowing for multiple dispatch, and providing a form of documentation.