|
|
|
|
|
by sklogic
3642 days ago
|
|
In a static type system, all of the expressions and expression-like constructs of your language may have a constraint attached to them, which guarantees that a value this expression yields have certain properties; In a static type system there is a well defined set of rules, describing how such constraints are transformed when expressions are combined in a certain way. In a dynamic type system, no such constraints exist (besides for the constant literals, of course) and there are no rules for combining the constraints. These definitions should cover all the spectrum. |
|
This gets close but I think it doesn't yield a conclusion that Java is statically typed, and I think most people want a definition that concludes Java is statically typed.
(unless you allow only fairly trivial "constraints" in which case you're no longer distinguishing between categories of languages, since essentially any language can satisfy a trivial-enough constraint on its expressions)