RE: [WebIDL] LC Comment - partial dictionary

>-----Original Message-----
>From: Cameron McCormack [mailto:cam@mcc.id.au]
>
>Travis Leithead:
>> It came up in a discussion this morning with the getUserMedia folks
>> that a dictionary they were defining for getUserMedia options should
>> be easily extensible. This got me wondering if the "extension"
>> mechanism for interfaces would work for dictionaries too? E.g., did
>> WebIDL support a "partial dictionary" which would allow another spec
>> in the future to add-on to an existing defined dictionary.
>>
>> If my understanding of the grammar is correct, the answer is
>> currently "no":
>>
>> [6] PartialInterface → "partial" "interface" identifier "{"
>> InterfaceMembers "}" ";"
>>
>> It's seems like dictionaries (and additionally, though probably
>> less-relevant, exceptions) should be allowed to be defined as
>> "partial". That would enable the ease-of-extensibility that we
>> currently enjoy with interfaces to extend to dictionaries as well.
>
>It does seem like it would be reasonable to support "partial
>dictionaries", but dictionary members are ordered (so that any JS
>getters are run in a defined order) and having partial dictionaries
>separated out over multiple IDL fragments makes it unclear what the
>order would be.

Good point. The ordering would be tough to figure out when split up. I suppose if the spec needs the extensibility then they can re-define the dictionary (completely) in a V2 spec for the feature.

Thanks for considering.

Received on Wednesday, 15 February 2012 00:53:27 UTC