Skip to content
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

Open
bzbarsky opened this issue Feb 23, 2019 · 5 comments
Open

Comments

@bzbarsky
Copy link
Collaborator

bzbarsky commented Feb 23, 2019

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

@domenic
Copy link
Member

domenic commented Feb 25, 2019

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...)

@bzbarsky
Copy link
Collaborator Author

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.

@domenic
Copy link
Member

domenic commented Feb 25, 2019

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.

@bzbarsky
Copy link
Collaborator Author

It would complicate both, but might still be worthwhile to catch people misusing it...

@domenic
Copy link
Member

domenic commented Feb 25, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants