-
Notifications
You must be signed in to change notification settings - Fork 165
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
It looks like we started allowing [TreatNullAs] on dictionary members #650
Comments
It was not purposeful. But, it sure seems simpler this way. (It looks like it was also restricted to not be on operations that are non-callback-interface operations. Lots of complexity there...) |
Well, it's meaningless on operations that are non-callback-interface operations, because it affects JS-to-IDL conversions, and those happen for return values of callback operations but not the other ones. So allowing it on non-callback operations makes no sense at all. For dictionaries, the argument for not allowing it is that it's not used there now, and its a legacy feature we don't want to proliferate, so it would be better to not allow it places where it's not used. |
My thinking was that we should rename it to LegacyNullToEmptyString (see #350), and discourage its use similar to other legacy things. And then in terms of actual restrictions, we should place normative restrictions only when it simplifies the spec/implementation. At first glance it seems like adding normative restrictions would complicate the spec, but I might be wrong, and I can't speak for implementation. |
It would complicate both, but might still be worthwhile to catch people misusing it... |
I feel fairly optimistic that if we rename things to start with "Legacy", with the accompanying warning like what we have today, people will stop using them. But, that may be over-optimistic. |
Before #286 [TreatNullAs] was only allowed on operation arguments and operations. In particular it was not allowed on dictionary members.
Was that restriction removed purposefully?
@domenic
The text was updated successfully, but these errors were encountered: