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 03:33:14 +0000
To: public-script-coord@w3.org
Message-Id: <E1Pwnfe-00053P-Pi@jessica.w3.org>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=12248

--- Comment #14 from Cameron McCormack <cam@mcc.id.au> 2011-03-08 03:33:14 UTC ---
(In reply to comment #13)
> It's not a problem in practice for implementors or web
> developers, so long as the [[Get]] internal operations used to access "keyword
> parameters" are done before any other steps in the given method's spec, and in
> a fixed order.

Just so that I am clear on the two choices here:

(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

The former means spec writers don't need to think about when properties are
accessed (since Web IDL defines it), but can lead to wasted work (and side
effects!) calling getters for properties that the UA would never care about.

The latter means the UA can get away with less work, but spec writers need to
specify when and in what order properties would be accessed.  (And I think
there's a reasonable chance that not all spec writers will do this correctly.)

I was saying "let's always do (A)", and you are saying "(B) is more natural". 
Both options are well defined and could be interoperably implemented.  (Correct
me if I am wrong.)

(Option (B) also means that specification writers probably need to lower
themselves to talking about the ECMAScript binding specifically, rather than
whatever higher level IDL type this functionality would correspond to.)

-- 
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 03:33:16 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:03 UTC