07:38
<Ms2ger>
It might actually be ambiguous in WebIDL. The spec is "Optional argument default values can also be specified using the two token value {}, which represents a default-initialized (as if from ES null or an object with no properties) dictionary value.", but as you say, null and "an object with no properties" could be interpreted as producing different dictionaries.
No it can't, there's actual normative prose elsewhere that will be unambiguous
11:26
<sideshowbarker>
annevk: https://github.com/mdn/content/pull/27927 would benefit from some of your attention
14:30
<bkardell>
hey annevk I don't really understand this comment https://github.com/whatwg/html/pull/9452#discussion_r1247914359 -- I could reply as much but this has taken so long already (apologies I have been taking care of my mom for the last month) that I thought maybe here could be faster to clarify
16:04
<annevk>
bkardell: I don't have a lot of time right now, but the comment is that what you're saying it branches on and the branches themselves don't line up
16:24
<Jeffrey Yasskin>
No it can't, there's actual normative prose elsewhere that will be unambiguous
"{}" only appears in WebIDL normative text twice, and the other just refers to this use. "Default-initialized" only appears once. Can you find the unambiguous normative prose for this?
16:58
<annevk>
Jeffrey Yasskin: presumably the normative requirement is the overload resolution algorithm followed by ES to dictionary conversion
17:00
<Jeffrey Yasskin>
ES->dictionary clearly specifies how null converts, and a fix would probably be to remove "or an object with no properties", but I don't see a place in overload resolution that mentions {} or default initialization.
17:00
<annevk>
Having said that, perhaps we should clarify that parenthetical
17:01
<annevk>
I think the {} is more of a syntax requirement on specifications to improve readability and doesn't translate into a requirement on Web IDL consumers
17:09
<Jeffrey Yasskin>
The requirement on WebIDL consumers comes from "If the argument at index i is declared with a default value, then append to values that default value." in https://webidl.spec.whatwg.org/#dfn-overload-resolution-algorithm, but it's only the text I quoted from https://webidl.spec.whatwg.org/#dfn-optional-argument-default-value that defines what the default value is. I fully believe that the text used to specify this precisely, but some refactoring must have lost it. I doubt anyone has actually implemented this differently; it's just a technical nit.
17:45
<annevk>
Jeffrey Yasskin: hmm yeah, file an issue? I couldn't find one
17:46
<annevk>
Great, blame isn't loading
17:52
<annevk>
Oh, it did: https://github.com/whatwg/webidl/commit/7329e8c62b5825376a52626a579a1890ac83cb29
17:53
<annevk>
So looking at that I don't think anything else was added at the time
20:44
<annevk>
bkardell: oh and hey, no need to apologize to me! I'm happy for you to take the time that you need. I should also note that I will be generally less available until August 20 or so. I have a couple more working days here and there and I'll try to prioritize this PR should you update it, but I'm personally in no rush. 😊