- From: Boris Zbarsky <notifications@github.com>
- Date: Tue, 07 Feb 2017 08:06:01 -0800
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/fetch/issues/479/278046106@github.com>
Well, it's a general API design decision. For dictionaries, IDL explicitly has identical behavior for `null`, `undefined`, and `{}` as operation arguments. It does not have that for dictionaries as dictionary members, but I think it should; that's what the discussion in https://github.com/heycam/webidl/issues/76 is about. For records, we made the behavior match dictionaries, because I guess people felt conceptually they were kind of the same (maybe because they were still thinking of the "half-open dictionary" case?). Note that this doesn't match what I had done with MozMap in Gecko, where I made it much more like a sequence than like a dictionary in terms of all this stuff (e.g. you can't pass undefined or null for a MozMap argument, and MozMap isn't forced to be an optional arg in trailing position, etc). It's possible that speccing record to be like dictionary was just a mistake. After all, `{}` as a dictionary just means "no values provided for any of the members", so it makes sense to give `null` and `undefined` the same behavior. But for a record `{}` is more like an explicit "the list is empty" which maybe shouldn't mean the same thing as "no list provided". So @jyasskin, @domenic, what behavior do we want here? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/issues/479#issuecomment-278046106
Received on Tuesday, 7 February 2017 16:06:33 UTC