4 ms·
Indeed, it is strongly typed but not statically typed. The only thing is, almost every language is strongly typed now, the only counterexample I know is C (and
by serve_yay 12y ago
Indeed, it is strongly typed but not statically typed. The only thing is, almost every language is strongly typed now, the only counterexample I know is C (and derivatives). Not that there aren't others, but I'm not sure there are others that anyone really uses. So I wonder if it is really even worth saying a language is "strongly typed" anymore, it's hardly ever a distinction. Might as well just say "not C".
- falcolas 12y agoC, JavaScript, PHP, lisp... There are many popular and weakly typed languages in use today.
- serve_yay 12y agoJS is strongly typed, not sure about PHP but I don't think so. lisp is not a language, it's a family of languages
- pythonautical 12y ago> [] + {} "[object Object]" > {} + [] 0 JS and PHP are the prototypical examples of weak typing.
- serve_yay 12y agoAgain, not sure about PHP. But no, JS is strongly typed. What you've shown there is coercion, not type-punning or anything of the sort.