-
Notifications
You must be signed in to change notification settings - Fork 174
Getting rid of optional #905
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
Comments
Sounds just right, no objection here. |
This is kind of nice. And argues more strongly for |
I don't have a strong opinion here; I like the |
All good |
A late question:
|
I agree that this is not like other defaults. But I think that's OK. Another way to think about it is to realize how weird the current In other words, it is good to align the case of "allows no argument and gets a default value of |
Currently we do use
|
Ah, sorry, I was confused by your example and thought it was currently Web IDL. Well, the larger point still stands. I think it will be nice to align both types of optional argument to use |
…as a const value and forbid it from being an argument type.
I guess one aspect that is a little weird here is that |
If we do #60, should we get rid of optional and instead use defaulting as sole mechanism?
would become
and
would become
(And if you need to distinguish between not given and undefined you use overloading, as XMLHttpRequest does for
open()
.)cc @saschanaz @tabatkins
The text was updated successfully, but these errors were encountered: