Re: [Future] First arguments should not be optional

Boris Zbarsky <[email protected]>
Newsgroups gmane.comp.web.dom.general
Message-ID <[email protected]>
On 5/8/13 6:39 PM, Cameron McCormack wrote:
> Yes.  You should be able to write
>
>    Future catch(optional AnyCallback rejectCallback);
>
> and have that cause
>
>    new Future().catch(undefined)
>
> to mean the same as
>
>    new Future().catch()
>
> while
>
>    new Future().catch(null)

You can already do that in WebIDL:

   Future catch([TreatUndefinedAs=Missing] optional AnyCallback 
rejectCallback);

no?

-Boris
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.