W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2010

Re: Removal of identifierless getters, setters, etc.

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Wed, 13 Oct 2010 20:02:14 -0700
Message-ID: <AANLkTimcz0ftE285jCdeNjkWumEFJ=eeHNX9r6f2iEwC@mail.gmail.com>
To: public-script-coord@w3.org
On 10/12/10, Cameron McCormack <cam@mcc.id.au> wrote:
> At TPAC last year, there was a discussion on Web IDL that resulted in a
> resolution to remove special operations (getters, setters, etc.) that
> have no identifier:
>   http://www.w3.org/2009/11/02-webapps-minutes.html#item06
> I donít see any rationale there, so I wonder if anyone who was there
> could explain?

I recall reading that document, e.g. "sequence is a JS array, array is
a host object" -- which jumped out at me at the time (because it is

The "getter" "setter" in WebIDL is what is known as "catchall" in
ECMAScript[0]. It exists in browsers (as shown in some of the linked
examples), but it's not standard and has some problems (see Waldemar's
explanation on the proposal page[0]).

The problems are easily seen in with "has" checks e.g. "in" operator,
Array.prototype.indexOf, etc. I've been over this a few times already
on whatwg et al so I'll be brief and share some links with those
examples and explanations.

Mark Miller's also looked into this[4]:
| Catchalls are an excellent example issue for both points, in opposite
| directions. Regarding the second point, yes, we believe that new host
| APIs should generally seek to avoid requiring catchalls, since new
| native (i.e., written in EcmaScript) APIs must, and since there are
| many benefits to being able to emulate more host APIs more easily in
| EcmaScript (such as the ability to interpose intermediary wrappers).
| Regarding the first point, since legacy host APIs do require
| catchalls, EcmaScript must eventually too. The definition of how
| WebIDL-expressed catchalls map to future EcmaScript should co-evolve
| with the changes to EcmaScript needed to support this mapping.

Seems pretty obvious to me.

Received on Thursday, 14 October 2010 03:02:46 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:02 UTC