-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider requiring optional dictionary defaulting explicitly #602
Comments
Or |
I suspect that |
OK. As long as people are clear on |
@annevk One question: would we still require the |
Yeah, I was thinking it would be a syntax error without it. I suspect we should require it always, to make it clear it's what happens when you pass undefined and you cannot branch on "dict not given" or some such. |
"{}") and require it to be specified for the dictionary arguments that are required to be optional. Fixes whatwg#585 Fixes whatwg#602
"{}") and require it to be specified for the dictionary arguments that are required to be optional. Fixes whatwg#585 Fixes whatwg#602
Instead of
foo(optional dictionaryType arg);
perhaps we should require writing
foo(optional dictionaryType arg = {});
for consistency with other optional arguments and for clarity for the reader. At least anecdotally this seems to be one of the most confusing things about IDL that's not a legacy feature.
The text was updated successfully, but these errors were encountered: