- From: Brendan Eich <brendan@mozilla.com>
- Date: Fri, 25 Sep 2009 17:08:45 -0700
- To: Maciej Stachowiak <mjs@apple.com>
- Cc: Jonas Sicking <jonas@sicking.cc>, Cameron McCormack <cam@mcc.id.au>, Anne van Kesteren <annevk@opera.com>, Sam Ruby <rubys@intertwingly.net>, es-discuss Steen <es-discuss@mozilla.org>, HTML WG <public-html@w3.org>, public-webapps@w3.org
On Sep 25, 2009, at 4:57 PM, Maciej Stachowiak wrote: > On Sep 25, 2009, at 1:18 PM, Brendan Eich wrote: > >> So if you are doing more ArrayLike interfaces, let's keep talking. >> Don't let at least my catchalls-considered-harmful statements stop >> progress on ArrayLikes. > > Perhaps when catchalls are considered for ECMAScript, there could b > a way to encapsulate the specific pattern of index access, so you > can have magical getters and setters for all index properties > (integer numbers in range to be an array index) without having to > install a full catchall for all properties. Good point -- implementing array-likes via catchalls has been on our minds since the ES4 "meta" days [1], although we never split hooks based on property name being non-negative (possibly also <= 2^32 - 1 -- or is it <= 2^32 - 2?!). With WebIDL folks' help we will probably take down ArrayLike first, without going whole-hog for catchalls. The "catchalls climb the meta ladder" problem is more profound than the index/length magic (even the awful uint32 domain) of array-likes. I agree with Waldemar, we should make progress on array-likes without getting hung up on catchalls. /be [1] http://wiki.ecmascript.org/doku.php?id=proposals:catchalls
Received on Saturday, 26 September 2009 00:09:32 UTC