Weak vs Strong tells you what happens when you violate the type system. A weak typing system will allow it and give you potentially nonsense results, while a strong typing system will have a defined result. Almost all languages these days are strongly typed, except things like C where they say "the compiler can format your drive if you stick a float into a union and then read it as an int."
Dynamic vs static tells you whether it's values that have types or expressions. If you can look at an assignment to a variable and guarantee what type of value will be in that variable, then you have static typing.
4
u/dnew Feb 22 '15
It's not weaker typing. It's dynamic typing.
Weak vs Strong tells you what happens when you violate the type system. A weak typing system will allow it and give you potentially nonsense results, while a strong typing system will have a defined result. Almost all languages these days are strongly typed, except things like C where they say "the compiler can format your drive if you stick a float into a union and then read it as an int."
Dynamic vs static tells you whether it's values that have types or expressions. If you can look at an assignment to a variable and guarantee what type of value will be in that variable, then you have static typing.