Comparison of programming languages by type system explained

This is a comparison of the features of the type systems and type checking of multiple programming languages.

Brief definitions

LanguageType safetyType expressionType checking
A+strongdynamic
ActionScript 3.0strongstatic
ABCstrong
ABAPstrongnominalstatic
Adastrong[1] explicitnominalstatic
Agdastrongnominalstatic
Aldorweakstatic
Alefstrongstatic
ALGOL 58strongexplicitstatic
ALGOL 60strongexplicitstatic
ALGOL 68strongexplicitstructuralstatic & tagged unions
ALGOL Wstrongstatic
Alicestrongstatic
Alma-0static
AmbientTalkstrongdynamic
AMOS BASICstatic
AngelScriptstrongstatic
APLstrongdynamic
AppleScriptweakdynamic
Arcdynamic
AutoHotkeytypeless
AutoLISPdynamic
Ateji PXstrongexplicitnominalstatic
AWKweakimplicitdynamic
Btypeless
Ballerinastrongstructuralstatic
Bash
BASICstrongexplicitnominalstatic
BCPLtypeless
BeanShellstrongnominaldynamic
BLISStypeless
Boostrong
Brostrongnominalstatic
Cweakexplicitnominalstatic
C--weakstatic
C++ (ISO/IEC 14882)weaknominal
C*weakexplicitstatic
C#weaknominal
C shell
Camlstrongstatic
Cecil
Cleanstrongimplicitstatic
Ceylonstrongstatic
Chapelstatic
CHILLstrongstatic
ChucKstrong
Cilkweakexplicitstatic
Clairestrong
Cleanstrongstatic and dynamic
Clojurestrongdynamic
CLUstrong
COBOLstrongexplicitnominalstatic
Cobrastrong
CoffeeScriptimplicitdynamic
ColdFusion (CFML)strongimplicitdynamic
COMALstrong
Common Lispstrongstructural for implicit typing, nominal for explicit typingdynamic, some static checking(depending on implementation)
Component Pascalstrongstatic
Coolstrongexplicitstatic
CORALstrongstatic
Crystalstructuralstatic
Cuneiformexplicitstatic
Curlstrongnominal
Currystrongstatic
Cythonstrongnominal (extension types) and structural (Python)
Dweak[2] explicitnominalstatic
Dartstrong[3] gradual typingnominal
Dylanstrongdynamic
Eiffelstrongnominalstatic
Elixirstrongimplicitdynamic
Erlangstrongimplicitdynamic
Euphoriastrongexplicit, implicit with objectsnominalstatic, dynamic with objects
F#strongimplicitnominalstatic
Forthtypeless
Fortranstrongexplicit[4] nominalstatic
Gambasstrongexplicitnominal
GLBasicstrongexplicit. Non-explicit declarations available through project optionsnominalstatic
Go[5] strongstructuralstatic
Gosustrongnominal (subclassing) and structuralstatic
Groovystrong
Harbourstrongdynamic
Haskellstrongnominal[6] [7] static
Haxestrongnominal (subclassing) and structural
Iostrongimplicitdynamic
iconstrongimplicitdynamic
ISLISPstrongdynamic
Jstrongdynamic
Javastrong[8] explicitnominalstatic
JavaScriptweakimplicitdynamic
Juliastrongstructural for implicit typing, nominal for explicit typingdynamic
Joystrongdynamic
Kotlinstrongnominalstatic
LabVIEWstrong
Luastrongimplicitdynamic
Maplestrongdynamic
Mercurystrongstatic
Mathematicastrongdynamic
MATLAB M-codestrongdynamic
Modula-2weakexplicitnominalstatic
Modula-3weakexplicitstructuralstatic
MUMPS (M)typeless
Nekodynamic
Nemerlestrongimplicitnominalstatic
NetLogostrongimplicitdynamic
NetRexxstrong
newLispimplicitdynamic
NEWPstrongstatic
Newspeakdynamic
NewtonScriptdynamic
Nialdynamic
Nimstrongstatic
Nicklestrong
Nudynamic
Oberonstrongexplicitnominal
Objective-Cstrongexplicitnominal
OCamlstrongnominal for records,[9] structural for objectsstatic
Object Pascalstrongexplicitnominalstatic
Opastrongstructuralstatic
Oxygeneweakimplicitstatic
Oz-Mozartstrongimplicitstructuraldynamic
Pascalweakexplicitnominalstatic
Perl 5implicitdynamic
PHPweaknominaldynamic
Plusstrongexplicitstructural
Prologdynamic
Puredynamic
PureScriptstrongnominalstatic
Pythonstrongnominaldynamic
Rimplicitdynamic
Raku
REBOLstrongimplicitdynamic
Rexxtypeless, implicit wrt numbersstatic+dynamic wrt numbers
RPGweakstatic
Rubystrongimplicitdynamic
Ruststrongmostly nominalstatic
Sdynamic
S-Langstrongimplicitdynamic
Scalastrongnominal (subclassing) and structuralstatic
Schemestrongimplicitdynamic (latent)
Seed7strongexplicitnominalstatic
Simulastrong
Smalltalkstrongimplicitdynamic
Swiftstrongnominal (subclassing) and structuralstatic
Standard MLstrongstructuralstatic
Tcldynamic
TypeScriptoptionalstructuralstatic
Uniconstrongimplicitdynamic
Visual Basicstrongnominalstatic
weakexplicitstatic
Visual Prologstrongnominalstatic
Wolfram Languagestrongdynamic
Windows PowerShellstrongimplicitdynamic
XLstrongnominalstatic
Xojostrongexplicitnominalstatic
XPath/XQuerystrongnominal
LanguageType safetyType expressionType compatibility and equivalenceType checking

References

Notes and References

  1. Unsafe operations are well isolated by a "Unchecked_" prefix.
  2. It is almost safe, unsafe features are not commonly used.
  3. Web site: The Dart type system. dart.dev. 2020-04-08.
  4. Optionally, typing can be explicitly implied by the first letter of the identifier (known as implicit typing within the Fortran community).
  5. http://golang.org/doc/go_spec.html The Go Programming Language Specification
  6. Web site: Why does Haskell not have records with structural typing?. Löh. Andres. Stack Overflow. live. https://web.archive.org/web/20160314002428/https://stackoverflow.com/questions/21071603/why-does-haskell-not-have-records-with-structural-typing. 2016-03-14. 2020-04-13.
  7. Web site: No, dynamic type systems are not inherently more open. King. Alexis. 2020-01-19. lexi-lambda.github.io. live. https://web.archive.org/web/20200301232239/https://lexi-lambda.github.io/blog/2020/01/19/no-dynamic-type-systems-are-not-inherently-more-open/. 2020-03-01. 2020-04-13.
  8. Sheng Liang, Gilad Bracha. Dynamic class loading in the Java virtual machine. Volume 33, Issue 10 of ACM SIGPLAN Notices, October 1998.
  9. Web site: Record · Reason. reasonml.github.io. en. live. https://web.archive.org/web/20200331191451/https://reasonml.github.io/docs/en/record. 2020-03-31. 2020-04-13.