On web design: The fourth and seventh errors represent uncaught - TopicsExpress



          

On web design: The fourth and seventh errors represent uncaught JavaScript exceptions. In a rational universe, a single uncaught excep- tion would terminate a program, and if a program continued to execute after throwing such an exception, we would know that Ragnarok is here and Odin is not happy. In the browser world, ignoring uncaught exceptions is called “Wednesday, and all days not called ‘Wednesday.’” The JavaScript event loop is quite impervious to conventional notions of software reliabil- ity, so if an event handler throws an exception, the event loop will literally pretend like nothing happened and keep running. This ludicrous momentum continues even if, in the case of the seventh error, the Web page tries to call init() on an object that has no init() method. You should feel uncomfortable that a Web page can disagree with itself about the existence of initialization routines, but the page is *still allowed to do things with things*. Such a dramatic mismatch of expectations would be unacceptable in any other context. You would be sad if you went to the hospital to have your appendix removed, and the surgeon opened you up, and she said, “I DIDN’T EXPECT YOUR LIVER TO HAVE GILLS,” and then she proceeded with her original surgical plan, despite the fact that you’re apparently a mer-person. Being a mer-person should have non-ignorable ramifications in the material universe. Similarly, if a Web page thinks than an object should be initialized, but the object has no initialization method, the browser shouldn’t laugh about it and then proceed under the assumption that the rest of the page is agnostic about whether its objects are composed of folly. https://usenix.org/system/files/1403_02-08_mickens.pdf
Posted on: Thu, 27 Mar 2014 15:00:52 +0000

Trending Topics



Recently Viewed Topics




© 2015