W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2012

Re: Invoking methods with optional arguments with no default values specified

From: Cameron McCormack <cam@mcc.id.au>
Date: Tue, 10 Apr 2012 12:56:58 +1000
Message-ID: <4F83A17A.6080401@mcc.id.au>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
CC: "public-script-coord@w3.org" <public-script-coord@w3.org>
Boris Zbarsky:
> Should (void 0) converted to the right IDL type be assumed as the
> default value?  If not, how is this supposed to actually work?

No, they should just be considered "not specified".  If you write:

   void f(optional long x = 0);

Then the prose for f can just assume that x always has a value, but if 
you write say:

   void g(optional object x);

then the prose for g will need wording like "If x was specified, then ...".
Received on Tuesday, 10 April 2012 02:57:33 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:06 UTC