-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
This issue was originally filed by ladicek@gmail.com
I propose to remove ?check operator (I believe it's called "argument existence test" or something like that in the spec).
Reason: in a sense, it allows optional parameters to have two observable values at the same time. If used, this affects API a lot, but there's no way for the API user to know. And there's no way to opt out. I personally believe that any function using this operator forms an ill-designed API.
Also, it breaks the way people were forwarding parameters to other functions for decades -- and there's even a proposal to add special syntax for that. Having to use special syntax just to forward parameters is highly error-prone and is likely to lead to style rules like "always use this forwarding syntax, 'cause you can't never know".
If this is deemed absolutely necessary (I've heard that maybe the DOM requires it), then I'd propose removing the possibility of optional parameters having two simultaneous values, and instead adding a possibility for optional parameters having no value. I believe this concept is much easier to grasp, and it would have to be visible on the API level (so that possible issues can be detected early).