[whatwg] Script loading and execution order for importScripts

Oliver Hunt oliver at apple.com
Sat Mar 7 21:04:44 PST 2009


>
> Why do you think it's important not to have side effects for syntax
> errors but don't think it's important to not have side effects for
> run-time errors? Given that we simply can't fix the latter, I don't
> see any advantage to users to attempt to fix the former.
>
> I really don't think optimizing for the case when something has gone
> wrong is the way to go. That is an extremely rare case in a deployed
> application, and so optimizing for performance feels much more
> important to users.
>
> Also considering how applications are likely to handle these errors,
> I.e. full abort and tell user that an unrecoverable error has
> occurred, it doesn't really matter if there have been side effects or
> not.

The primary situation i'm imagining could happen is one script starts  
manipulating a client side database onload (maybe  a conscious  
decision to do db work while waiting for io), then the next script  
fails to load due to (say) a network failure, then your left with side  
effects they may not be reasonably recoverable.  Arguably this design  
should be considered flawed anyway, but people tend to test under  
ideal conditions more often than not.  The counter argument is that  
protecting developers from their own foolishness is not a goal.

>
> / Jonas

--Oliver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090307/762036f5/attachment-0002.htm>


More information about the whatwg mailing list