Re: [heycam/webidl] More convenient way to refer to / use "map iterators" (#324)

Yeah, for URLSearchParams you can have duplicate keys and the order between those duplicates is significant. For Headers you can have duplicate keys, but there it results in one key with multiple values.

Typically for these constructs you also want to support `record<key, value>` which can express less (only unique keys), but has more convenient syntax.

(And maybe `record<key, sequence<value>>`, though we haven't gone that far yet.)

I think using map is a little wrong, something like key-value-sequence seems more accurate, and if we go there it should encompass all those input forms I think so we are somewhat consistent. (And then users need to deal with duplicate keys.)

This also seems like another case where you don't necessarily want it as return value, just as input. But if it needs to be a return value, it should be a nested array or iterator for one I think, since that can encompass the full semantics.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/324#issuecomment-283352218

Received on Wednesday, 1 March 2017 14:21:38 UTC