10 biggest JS pitfalls

Benoit Marchant marchant at mac.com
Sat Jan 5 22:51:58 PST 2013


:-) Well put Andrea.

Benoit

On Jan 5, 2013, at 22:38, Andrea Giammarchi <andrea.giammarchi at gmail.com> wrote:

> Exactly Brendan, I could not agree more and this is my No. 1 pitfall about JS: developers often not doing real work complaining about stuff that developers doing real work don't even care about or never ever had to worry about.
> 
> In any case they can learn and understand the feature/problem using the feature when needed, avoiding its weakness when necessary.
> 
> About falsy and truthy, null and undefined, who cares ... seriously, and to be honest, that's not a pitfall, is rather a feature when needed as it is for all other scripting languages as long as you know what you are doing ... and no programming language will save you if you don't know what you are doing and it's your duty, as developer, to understand the language you are using if that's your job.
> 
> Again, about falsy ... if I see a glass empty, it does not mean I used a microscope to understand no water is left in the whole glass surface ... I just consider that empty and I add water on top.
> 
> Engineers have the tendency to over complicate even simple tasks as the one I've just described ... what is the benefit? What is the result? That the day falsy values in JS will disappear libraries authors will implement an isFalsy(value) function/method and use it 90% of the time regretting the trick with == disappeared ... isn't it ;-)
> 
> Last, but not least, happy new year to everyone :-)
> 
> br
> 
> On Sun, Dec 30, 2012 at 3:38 PM, Brendan Eich <brendan at mozilla.com> wrote:
>> 
>> 
>> I've never heard anyone doing real work complain
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130105/3ac656c4/attachment.html>


More information about the es-discuss mailing list