On Aug 3, 2009, at 10:21 AM, Erik Arvidsson wrote:
Discussing whether we want to put setTimeout etc into ECMAScript? There is a clearly a gap between ES and HTML5. How can we close the gap? Execution model needs to be standardized.
See current WHATWG work: http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#dom-windowtimers-settimeout
Brendan: set setMissing ---------------- setIndexed getIndexed Mark: ES4 had List/Vector. Brendan: Maciej also wanted Set set covers the use case. It requires more work than setMissing (setIndexed/getIndexed) but it might be better to start simple. Brendan: a = [] a[(1 << 32) - 2] = 42; a[(1 << 32)] = 43; print(a[0]) => undefined a.length => (1 << 32) -1
To clarify this a bit (my whiteboard needs narration) the discussion was about the trade-offs between a richer catchalls proposal that specializes hooks for indexed properties, vs. one that has setMissing and set -- or only set (called on every set). The simpler the proposal, the harder to optimize: an implementation might have to take apart the catchall set handler to see whether it is checking for an "index" identifier, e.g. Such simplification of the catchalls proposal would slow down non-indexed-property catchalls too.
I recall favoring at least a split between set and setMissing, as David-Sarah had suggested based on the wiki'ed catchalls proposal's set/add separation:
http://wiki.ecmascript.org/doku.php?id=strawman:catchallsNone of this addresses the "climbing the meta ladder" observation/ objection from Waldemar. The mirages approach based on mirrors may -- Mark cited this paper:
http://prog.vub.ac.be/Publications/2007/vub-prog-tr-07-16.pdf
Brendan: let o = {x: 0, y: 1} const; Allen: var o = { method f() {} }; it would do binding.
The punchline is to enhance object initialisers to express attributes needed for static analysis and optimization, so these are more truly "object literals", more like ML record type instances.
/be
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss