Programming Language Theory: Difference between revisions
| Line 125: | Line 125: | ||
Weak- vs strong-typing refers to the degree to which the language's typing system can be subverted, and whether this is regularly necessary. Static- vs dynamic-typing refers to (among other possible definitions) whether type is determined at compile-time or run-time. The benefits of static typing include: | Weak- vs strong-typing refers to the degree to which the language's typing system can be subverted, and whether this is regularly necessary. Static- vs dynamic-typing refers to (among other possible definitions) whether type is determined at compile-time or run-time. The benefits of static typing include: | ||
* Detection of many types of errors at compile-time | * Detection of many types of errors at compile-time | ||
** "Safety = Progress + Preservation" (Harper 1994) suggests well-typed expressions ought not get [[Programming_Language_Theory#Divergent_Combinators|stuck]], and that reductions of well-typed expressions are themselves well-typed. | |||
* Improved performance, reduced resource requirements | * Improved performance, reduced resource requirements | ||
* Secure data abstractions can be built atop the safety of strong typing systems | * Secure data abstractions can be built atop the safety of strong typing systems | ||