incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Mueller <pmue...@gmail.com>
Subject Re: `instanceof` considered harmful in cordova-js
Date Fri, 27 Apr 2012 18:53:13 GMT
On Fri, Apr 27, 2012 at 14:38, Brian LeRoux <b@brian.io> wrote:

> .... its good to be defensive but
> this code would just silently return instead of failing noisily
> anyhow.


"silently return"ing can be an error.  eg, almond's require(), which
doesn't throw exceptions if you've not define()'d a module, tends to be a
pain in the arse to debug.

Especially for the "core" bits, especially at start up time, we should be
pretty defensive and noisy.  Lost hours a week ago debugging a startup
issue in the core bits.  To figure it out, I had to make the core defensive
and noisy.

More discussion on this, here: https://issues.apache.org/jira/browse/CB-508

-- 
Patrick Mueller
http://muellerware.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message