Re: [heycam/webidl] Investigate banning nullable enums (#213)

Optional enum values (in dictionaries, and as arguments) may make sense as a "use the default" kind of thing, especially when the default is computed in a complicated way from other arguments or dictionary members, or depends on prior state or whatnot.

I looked at where nullable enums are used in Gecko's IDL.  Apart from codegen tests and some nonstandard APIs, they are not used.

In the nonstandard APIs, there are some cases in which null is used to indicate "object is not in a state that can provide this data right now".  And boy are there a lot of uses like that.  :(  Those APIs were all written by JS hackers, for what it's worth, so it's a data point in terms of what "authors" expect.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/213#issuecomment-257209695

Received on Monday, 31 October 2016 04:01:21 UTC