10 biggest JS pitfalls

Axel Rauschmayer axel at rauschma.de
Sun Jan 6 07:14:57 PST 2013

[cc-ing es-discuss again]

Yes. I like the idea of JS(L|H)int as a teacher for newcomers!

On Jan 6, 2013, at 15:52 , Andrea Giammarchi <andrea.giammarchi at gmail.com> wrote:

> I think for your latter point and about haters, JSLint can help there. Put in this way ... I hate JSLint :D
> On Sun, Jan 6, 2013 at 5:06 AM, Axel Rauschmayer <axel at rauschma.de> wrote:
>> Do not think what you learned at University about Java is the way every programming language should be .... do not think other programming/scripting languages are inferior because of your inflexible, indoctrinated knowledge about programming, just learn something more, read specs, those are small for what the language offer in JS case, and stop moaning about null and undefined, falsy, and all those script thing stat made scripting historically easier and often more productive than strict programming languages.
>> The "you" I have used here is not about you .. you know these things, so why even bothering calling them pitfalls ... pitfalls are those nobody can understand, your 10 points are my breakfast, if you don't mind passing the metaphor ...
>> As summary, in my opinion, there's no need to write top 10 here: these are pointless, completely subjective, and **always** available, no matter which one is the topic.
> This is not about pointing out how bad JavaScript is, it is about collecting things that confuse people who are new to the language. They help those people to learn what you already know. Many people really hate JavaScript. Some of those, we’ll never convert, they’d rather program Java than JavaScript (as you point out above). But some do cite valid WTFs. Some of those WTFs even get you if you know the language well (e.g. `this` in non-method functions). Thankfully, ES6 will fix many of those. It’ll prove the haters wrong who say that JavaScript is beyond fixing.
>> These, are not what we need ... Object.observe idea/mechanism/possibility is, the fat null is == undefined is not stopping anyone, and never did, from creating amazing stuff with the Web or, lately, the server.
> Those are complementary issues! We need to both make the core of JavaScript simpler and give it functionality such as Object.observe(). Both is happening, so I’m not worried.
> -- 
> Dr. Axel Rauschmayer
> axel at rauschma.de
> home: rauschma.de
> twitter: twitter.com/rauschma
> blog: 2ality.com

Dr. Axel Rauschmayer
axel at rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130106/a5b39996/attachment-0001.html>

More information about the es-discuss mailing list