4 ms·
It's really funny to see someone complaining about the lack of CS fundamentals in other people but does not know the difference between a weakly typed language
by still_grokking 8y ago
It's really funny to see someone complaining about the lack of CS fundamentals in other people but does not know the difference between a weakly typed language and a dynamic one. :-D
To recapitulate some basics: JS is a strongly typed dynamic language.
- throwaway487549 8y ago> JS is a strongly typed Strongly typed implies no implicit coersions at runtime. Python is strongly typed. JS or PHP are weakly typed.
- still_grokking 8y agoThat's wrong. What's about this Python code: 1.0 + 1 Or this Scala Code: "1".toFloat + "1".toInt In both cases that's clearly implicit type coercion at runtime. So according to the above constraint there would hardly be any strongly typed languages… (But quite the opposite is true in fact). Weakly typed means you can hose the type-system somehow and then perform some "illegal" or completely nonsensical operation. For example that's easy in C, but not possible in JS. In a strongly typed language any value has some precise type at any time. This is true for JS so it's strongly typed.