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

dictionary questions

From: David Flanagan <dflanagan@mozilla.com>
Date: Mon, 18 Jul 2011 14:18:46 -0700
Message-ID: <4E24A336.1080403@mozilla.com>
To: "public-script-coord@w3.org" <public-script-coord@w3.org>
I've got a few questions about dictionaries:

1) 3.4 says that dictionary members are ordered, and that the order is 
the order in which the members appear in the IDL.  It is not clear to me 
whether this is intended to apply to inherited dictionary members as 
well. I don't think IDL allows forward references, so inherited members 
obviously come before non-inherited members, but that seems like a 
tenuous connection.  I assume that inherited members come first, but it 
seems to me that this ought to be explicitly stated.

2) On the other hand, why do dictionary members need an ordering at 
all?  3.4 forbids duplicate member names, and doesn't allow 
dictionaries to shadow or redefine the members they inherit.  So I can't 
see anywhere that the ordering matters.  It would simplify the 
algorithms in 4.2.17 to remove the ordering altogether.

3) In 4.2.17, in the algorithm for converting an IDL dictionary to an 
ES Object, shouldn't the Dictionary's default values be used for members 
that are not present?  And if not, what is the point of the default values?


Received on Monday, 18 July 2011 21:19:23 UTC

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