Re: [whatwg/webidl] Make the dictionary <-> ordered map correspondence clearer about order (Issue #1257)

I read “dictionary” and “dictionary members” there as referring to the definitional Web IDL constructs rather than the entries of a concrete dictionary instances. This seems to be how “members” is commonly used throughout the spec. Is this also how you read it?

The ES binding conversion steps seem to support this interpretation. For example when converting Web IDL dictionary values to ES values, where `V` is the Web IDL dictionary-typed value and `D` is “the dictionary” (the definition), it is the order of the members of `D`, not `V`, which determines the sequence of property creation.

It seems like the spec doesn’t really answer the question of whether concrete dictionary instances have ordered members. That order can’t be observed from ES — well, at least not unless an algorithm specifically exposed it somehow. I agree it would be good for it to make this clear. It seems like consistency with Web IDL record values (which do have ordered entries) would be desirable.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/issues/1257#issuecomment-1404525487

You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/webidl/issues/1257/1404525487@github.com>

Received on Thursday, 26 January 2023 03:30:53 UTC