typsystem
A type system is a formal framework in a programming language that assigns types to expressions, variables, functions, and modules, and defines how these types can be combined. The primary goal is to prevent certain kinds of errors by ensuring that operations are applied to values of appropriate kinds, such as not applying a number as a function.
Type checking can occur at compile time (static typing) or at run time (dynamic typing). Some languages
Type systems can be nominal, where types are identified by names and declarations, or structural, where type
Common features include type inference, where the compiler deduces types without explicit annotations; generics or parametric
Examples illustrate the variety of designs. ML and Haskell use static, strong type systems with type inference;