Typed and untyped languages
|
In computer science, some programming languages are typed and some are untyped. Regardless of static or dynamic checking, a language can be strongly typed or weakly typed. This article categorizes languages by a type system.
Languages can perform type-checking either statically or dynamically. Statically implies the type-checking is done on code compilaton. Dynamic refers to type-checking being done at run-time. See Dynamically_typed and Static_typing#Static and dynamic type checking in practice. For a definition of strong and weak languages, see Strongly-typed_programming_language.
The syntax of the following headings is of <compilation time, type checking level>. Static and dynamic are the times (either at compile or interpretation). Strong and weak are the extent to which type checking is enforced and how "strict" the type checker is.
Contents |
Static, strong
Static, weak
- C (type declaration -- also, plenty of ways to get around the type-system and do something type-unsafe!)
- C++ (type declaration -- has casts and implicit conversions though fewer than C)
- Java (type declaration -- also has casting)
Dynamic, strong
- Common Lisp (type declarations are optional)
- Python
- Ruby (more precisely, duck typing)