4 ms·
I'm not too knowledgeable about type systems but to me "undefined is not a function" is simply the by-product of a dynamic/weak type system. That complaint can
by xtrumanx 12y ago
I'm not too knowledgeable about type systems but to me "undefined is not a function" is simply the by-product of a dynamic/weak type system. That complaint can be equally applied to ruby, python, etc. Can't I misspell a property or variable in such languages and get a similar error to "undefined is not a function"? Yet I don't see people complaining about them as much as JavaScript.
- lmm 12y agoNo, in Ruby/Python/etc. the error message at least tells you which property was misspelled/undefined. It's still bad (I would hate to have to use Ruby/Python for everything and would complain if they were the only languages the browser supported) but it's 10x better than Javascript.
- xtrumanx 12y agoOh, now I understand why that's error is such a big deal for people. I guess it never clicked for me since whenever I come across it I usually also have access to a stack trace or that line number which threw the error.