4 ms·
They are not the same, at least according to the definitions I'm familiar with. Static/dynamic is whether type checking is done at compile time or run type. S
by albntomat0 6y ago
They are not the same, at least according to the definitions I'm familiar with.
Static/dynamic is whether type checking is done at compile time or run type.
Strong/weak is how flexible the language is with type conversion.
Another explanation: https://en.hexlet.io/courses/intro_to_programming/lessons/types/theory_unit https://en.hexlet.io/courses/intro_to_programming/lessons/ty...
- nafey 6y agoAre these dimensions orthogonal though? For example is there any Strongly typed dynamic language?
- teddyh 6y agoI think Python is mentioned as the usual example.
- elbear 6y agoPython is considered strongly typed, but usually it's placed in opposition with PHP or JavaScript. That's why I don't understand why the previous poster used strongly typed. The conversation was about static and dynamic programming languages.
- rowanG077 6y agoYes. Completely orthogonal. Strongly typed dynamic: Python Weakly typed dynamic: Javascript Strongly typed static: Haskell Weakly typed static: C
- JAlexoid 6y agoStatic vs dynamic is not for type checking, it's about conversion. As in: Static typing - 1 == "1" is false (Python style, integer isn't converted to string for comparison) Dynamic typing - 1 == "1" is true (PHP style, integer or string may be converted)
- albntomat0 6y agoWhere are you getting your definitions from? What you posted is what I understand to be weak vs strong.
- JAlexoid 6y agoBarbara Liskov defines strong typing as a compiler feature that prevents wrong type usage. Liskov, B; Zilles, S (1974). "Programming with abstract data types". http://web.cs.iastate.edu/~hridesh/teaching/362/07/01/papers/p50-liskov.pdf http://web.cs.iastate.edu/~hridesh/teaching/362/07/01/papers...