Which of these two definitions is correct?
- Statically typed - Type matching is checked at compile time (and therefore can only be applied to compiled languages)
- Dynamically typed - Type matching is checked at run time, or not at all. (this term can be applied to compiled or interpreted languages)
- Statically typed - Types are assigned to variables, so that I would say 'x is of type int'.
- Dynamically typed - types are assigned to values (if at all), so that I would say 'x is holding an int'
By this definition, static or dynamic typing is not tied to compiled or interpreted languages.
Which is correct, or is neither one quite right?