News for hackers. Stuff that matters.
Re:Promises/A+ by willvarfar on Tuesday July 09, 2013 @01:13AM (#6011227)
Hmm null is easier to pass on purpose and undefined is easier to pass by accident.

Sending in undefined for a non-trailing argument takes effort.

I think the literal null is far more communicative of the developers intent.

But the general point is, JS APIs tend to fail silently on error by design and that's something that bugs me, literally. Bugs. Lots of them.

I agree regards returning a failure rather than throwing an exception, though.

There are no comments on this comment yet.