W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2011

[Bug 12248] Make objects first-class API citizens

From: <bugzilla@jessica.w3.org>
Date: Tue, 08 Mar 2011 06:47:00 +0000
To: public-script-coord@w3.org
Message-Id: <E1PwqhA-0006yo-U3@jessica.w3.org>

--- Comment #26 from Brendan Eich <brendan@mozilla.org> 2011-03-08 06:47:00 UTC ---
(In reply to comment #16)
> (In reply to comment #14)
> > (A) if serializing, you would end up calling every getter on the object (and on
> > all of the objects referenced by its properties, and so on) in a particular
> > order, before actually doing the work in the method
> > 
> > (B) if not serializing, but handling accessors, the UA would just grab
> > properties in whatever order it liked, at any time during the method
> We have mentioned ES5's ToPropertyDescriptor internal abstract operation here.
> It does (A). It "serializes" from a JS object into an internal data structure
> that is not visible to the programming language user.

Sorry, I read and then promptly forgot the part of (A) cited above that calls
every getter (or gets every value, if a data property) on the object, and so on

Allen straigthened this out in comment 24.

I still don't know where this idea comes from. You are not mixing serialization
or remoting with objects-as-keyword-parameter-sets, I hope. Remoting cannot be
blind and "deep" over object parameters without consulting WebIDL types and in
vs. inout vs. out.

(B) is still not proposed. So let's say (A) as above, vs. (C):

(C) if keyword-parameter-passing, call [[Get]] in a certain order on each name
in the set of keyword-parameter names that is appropriate for the positional
formal parameter in which this object actual parameter was passed, in the
context of the method being specified. These calls to [[Get]] happen before
anything else in the method's spec, apart from processing of keyword-parameter
objects passed to lower (left of the current) position formal parameters.

Allen also mentioned Harmony Proxies. That reminds me: we intend to implement
the Gecko DOM using Proxies in future, with handlers and traps that may or may
not be written in JS.

A proxy client cannot tell what implements the handler, so there is no way for
a method specified to reject getters to reject proxies with traps written in
JS. All proxies would have to be rejected, including (in our future
implementation) all DOM objects. This seems untenable if any object parameter
could be a DOM object or a JS object.


Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Tuesday, 8 March 2011 06:47:02 UTC

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