- From: Cameron McCormack <cam@mcc.id.au>
- Date: Sun, 12 Aug 2012 11:12:54 +1000
- To: Brendan Eich <brendan@mozilla.org>
- CC: Jonas Sicking <jonas@sicking.cc>, Boris Zbarsky <bzbarsky@mit.edu>, public-script-coord@w3.org, es-discuss@mozilla.org
Jonas Sicking:
>> Webkit also puts attributes on objects for non-globals, but I'm not
>> promoting that behavior. Nor do I know of any benefits regarding web
>> compatibility that comes with that behavior.
Brendan Eich:
> Ok, that's what I was getting at. It may be that this is just historical
> consistency for all objects, no global exception, but sounds like we are
> agreeing that the global object needs an exception ("own" promotion of
> attributes and methods) in WebIDL.
Before ES5 was out, Web IDL put properties for IDL attributes on
instances, exposed via special [[Get]] and [[Put]] behaviour. That was
pretty much what implementations were doing. Once ES5 standardised
accessor properties, we had the opportunity to make IDL attributes less
magical -- which was argued for pretty strongly by TC39 folks, before
Proxies came along. Now perhaps I didn't consider closely enough the
possibility of this being a breaking change (especially on the global
object), but it seemed everyone was happy enough with moving in that
direction. And I think it's a cleaner model for shared properties with
getter/setter behaviour, anyway, and gives you the opportunity to
monkeypatch them that the special [[Get]] and [[Put]] behaviour couldn't.
Which is to say that I think we should still push forward with
attributes-as-accessor-properties-on-prototypes at least for objects
other than the global object.
Received on Sunday, 12 August 2012 01:13:28 UTC