Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

JS is strongly typed, not sure about PHP but I don't think so. lisp is not a language, it's a family of languages


> [] + {}

"[object Object]"

> {} + []

0

JS and PHP are the prototypical examples of weak typing.


Again, 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: