notes-computer-programming-programmingLanguageDesign-prosAndCons-javascript

" Consider this example:

    '' == 0
    0 == '0'
    '' != '0'

In JavaScript?, all three of these statements return true. Doug highlights other traps that are easy to fall into using for..in, ++, and typeof. "

http://javascript.crockford.com/

http://javascript.crockford.com/prototypal.html

tutorials

http://javascript.crockford.com/survey.html

---

" JavaScript? has some crazy bad stuff, like with, var hoisting, a poor numeric model, dynamic this scoping, lack of modularity regarding binding lookup (witness the recent spate of browser bugs regarding prototype lookup on user objects), the strange arguments object, and the lack of tail recursion. Then there are the useful features that JavaScript? lacks, like macros, modules, and delimited continuations. "

---

dang 11 minutes ago

I've been writing JS a long long time and my strategy has been never to learn the intricacies of 'this'—or the other bad neighborhoods of that language, but especially 'this'. I just avoid those neighborhoods. I write functions at the top level, keep all the signatures explicit, and enjoy the things the language does well.

Once every couple years or so I need to do something that requires me to step foot into understanding a little of 'this'. If Plan A (find a way to avoid it) fails, I go to Plan B: relearn the minimum necessary and forget it as soon as possible.

reply

---