Early error vs. error on first call to function vs. runtime error

Brendan Eich brendan at mozilla.org
Fri Sep 28 16:09:57 PDT 2012


Claus Reinke wrote:
> one might consider a <script provide>    with parse-on-use semantics?)

This is a good idea. Instead of JS engines trying to do a 
cheap-yet-sound parse (or "read") of JS source, developers could say 
that they expect a <script> to be not frequently used enough to justify 
non-defer and non-"provide" semantics (eager loading).

We do not want "developer mode" vs. "deploy mode" if it can be avoided. 
We want a way for developers to control latency hits, sorting JS into 
"hot" and "cold" paths at a coarse grain.

/be


More information about the es-discuss mailing list