A type specifies a set of values that have certain similarities in computing. With any type there is an associated set of operations that could (should) be applied to values of that type. One of the main differences between high-level and low-level programming languages is a low level language with no type system: such language has only bytes and words.
The type system of a programming language has the following features: Safety – On the basis of types, a compiler (or interpreter) identify certain faults (called type errors). The extent to which the compiler-based typing errors can be detected depends on the type of system: strong typing offers more security than weak typing.
Optimization – If the types of expressions are already known at compile time (static typing), the compiler can often apply certain optimizations (Computer Accessories Store). Documentation – When the types of used variables and function parameters are specified in a program they offer the reader of the source code clues about the nature and use of these variables and parameters.
Leave a Reply
You must be logged in to post a comment.