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

[Bug 20158] Unrestricted typed dictionary

From: <bugzilla@jessica.w3.org>
Date: Tue, 27 Sep 2016 16:43:35 +0000
To: public-script-coord@w3.org
Message-ID: <bug-20158-3890-UvcS5iIvDn@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=20158

--- Comment #13 from Anne <annevk@annevk.nl> ---
The other thing we need is unrestricted dictionaries with some preset members
for web animation. Sam Weinig dubbed these half-open dictionaries in
https://bugs.webkit.org/show_bug.cgi?id=158509#c14.

Strawman elaborate syntax:

open dictionary<keytype, valuetype> DictionaryName {
  memberType member;
}

Shorthand:

open dictionary<valuetype> DictionaryName;

would be short for

open dictionary<DOMString, valuetype> DictionaryName;

which is short for

open dictionary<DOMString, valuetype> DictionaryName {};

We could maybe leave out the open keyword and just rely the <> syntax to
indicate this. Either seems fine.

keytype should probably be restricted to string and numeric types (or just
string types).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Tuesday, 27 September 2016 16:43:43 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 27 September 2016 16:43:43 UTC