Programming languages are used for controlling the behavior of a machine (often a computer). Like natural languages, programming languages conform to rules for syntax and semantics.
There are thousands of programming languages and new ones are created every year. Few languages ever become sufficiently popular that they are used by more than a few people, but professional programmers can easily use dozens of different languages during their career.
| Language | Type strength | Type safety | Expression of types | Compatibility among composite types | Type checking |
|---|---|---|---|---|---|
| ActionScript 3.0 | strong | safe | static | ||
| Ada | strong | safe | explicit | name based | static |
| ALGOL 58 | strong | safe | static | ||
| ALGOL 60 | strong | safe | static | ||
| ALGOL 68 | strong | safe | property based | static or dynamic (.5D:_Structures.2C_unions_and_arrays) | |
| APL | strong | safe | dynamic | ||
| BASIC | varies by dialect | ||||
| BLISS | none | n/a | n/a | n/a | n/a |
| BeanShell | strong | safe | name based | dynamic | |
| Boo | strong | safe | implicit with optional explicit typing | static with optional dynamic typing | |
| C | weak | unsafe | explicit | name based | static |
| C++ (ISO/IEC 14882) | strong | unsafe | explicit | name based | static |
| C# | strong | unsafe | implicit | name based | partially dynamic |
| Clean | strong | implicit | static | ||
| COBOL | strong | static | |||
| ColdFusion | strong | safe | implicit | dynamic | |
| Common Lisp | strong | safe | dynamic | ||
| Curl | strong | safe | name based | ||
| D | strong | unsafe | explicit | name based | static |
| Dylan | strong | safe | dynamic | ||
| Eiffel | strong | safe | name based | static | |
| Erlang | strong | dynamic | |||
| F# | strong | safe | implicit | name based | static |
| Forth | none | n/a | n/a | n/a | n/a |
| Fortran | strong | safe | name based | static | |
| GraphTalk | weak | ||||
| Groovy | strong | safe | implicit | dynamic | |
| Haskell | strong | implicit | property based | static | |
| Io | strong | dynamic | |||
| J | strong | safe | dynamic | ||
| Java | strong | safe | explicit | name based | static |
| JavaScript | weak | implicit | dynamic | ||
| Joy | strong | safe | dynamic | ||
| Lua | strong | safe | implicit | dynamic | |
| Mathematica | strong | dynamic | |||
| MATLAB M-code | dynamic | ||||
| Modula-2 | strong | unsafe | explicit | property based | static |
| Modula-3 | strong | unsafe | explicit | property based | static |
| Oberon | strong | safe | explicit | static | |
| Objective-C | weak | explicit | static | ||
| Objective Caml | strong | safe | implicit | property based | static |
| Object Pascal (Delphi) | strong | unsafe | explicit | name based | static |
| Oxygene | strong | unsafe | implicit | static | |
| Oz | dynamic | ||||
| Pascal | strong | unsafe | explicit | name based | static |
| Perl 5 | weak | implicit | dynamic | ||
| Perl 6 | partially implicit (explicit for static types) | dynamic with optional static typing | |||
| PHP | weak | implicit | dynamic | ||
| Prolog | strong | dynamic | |||
| Python | strong | safe | implicit | property based | dynamic |
| Ruby | strong | safe | implicit | property based | dynamic |
| S | strong | dynamic | |||
| S-Lang | strong | safe | implicit | dynamic | |
| Scala | strong | partially implicit | static | ||
| Scheme | strong | dynamic (latent) | |||
| Smalltalk | strong | safe | implicit | dynamic | |
| Tcl | dynamic | ||||
| Visual Basic | strong | safe | name based | static | |
| Visual Basic .NET | strong | unsafe | static | ||
| Visual Prolog | strong | safe | name based | static | |
| Windows PowerShell | strong | safe | implicit | dynamic | |
| XL | strong | safe | name based | static | |
| Language | Type strength | Type safety | Expression of types | Compatibility among composite types | Type checking |
| Language | Statements ratio | Lines ratio |
|---|---|---|
| C | 1 | 1 |
| C++ | 2.5 | 1 |
| Fortran | 2.5 | 0.8 |
| Java | 2.5 | 1.5 |
| Perl | 6 | 6 |
| Smalltalk | 6 | 6.25 |
| Python | 6 | 6.5 |
The literature on programming languages contains an abundance of informal claims about their relative expressive power, but there's no framework for formalizing such statements nor for deriving interesting consequences. This chart provides two measures of expressiveness from two different sources. An additional measure of expressiveness, in GZip bytes, can be found with the Compare to tool on the The Computer Language Benchmarks Game