[Bug 20158] Unrestricted typed dictionary


--- Comment #18 from Jeffrey Yasskin <jyasskin@gmail.com> ---
It works for me to not have numeric keys for now.

Looking at Anne's syntax, it doesn't let me have a field of open-dictionary
type without also giving that type a name. Do y'all want that restriction?

If we initially don't need to support half-open dictionaries for web animation,
and 2-token types give other people the same willies they give me, how about
"dictionary<keytype, valuetype>", with the first argument defaulting to
DOMString? I'm nervous about defaulting initial arguments, but it looks clear
in this case.

I haven't looked into parsing this. Will re-using "dictionary" as a type
instead of a type introducer cause problems? If it will, then
OpenDictionary<key, value> could work.

In the future, if we want to add half-open dictionaries, would:

dictionary BasePropertyIndexedKeyframe : dictionary<(DOMString or
sequence<DOMString>)> {
    DOMString          easing = "linear";
    CompositeOperation composite;

make people happy? We'd have to write an explicit rule to override "The
identifier of a dictionary member must not be the same as that of another
dictionary member defined on the dictionary or on that dictionary’s inherited

If nobody objects, I'll send WebIDL a patch to add this.

You are receiving this mail because:
You are on the CC list for the bug.

Received on Wednesday, 28 September 2016 21:55:44 UTC