W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2009

Re: Interactions between optional and nullable

From: Robin Berjon <robin@robineko.com>
Date: Tue, 8 Dec 2009 18:17:34 +0100
Cc: public-script-coord@w3.org
Message-Id: <2C836389-2913-4CE6-851B-419BD110E30A@robineko.com>
To: Anne van Kesteren <annevk@opera.com>
On Dec 8, 2009, at 16:54 , Anne van Kesteren wrote:
> On Tue, 08 Dec 2009 16:38:44 +0100, Robin Berjon <robin@robineko.com> wrote:
>> I've been trying to figure out what the expected approach should be for the following case:
>> 
>>  interface Dahut {
>>      void foo (optional Foo foo, optional Bar bar);
>>  };
> 
> You want:
> 
>  interface Dahut {
>      void foo (optional Bar bar);
>      void foo (optional Foo foo, optional Bar bar);
>  };

That only works for this very specific example. It falls apart for something as simple as:

interface Unicorn {
    void neigh (optional DOMString sentence, optional DOMString grunts);
};

Let alone for anything with more than two optional parameters that may or may not be of the same type, etc.

Admittedly, at some point we should just use an options map. But some cases seem to still want positional.

--
Robin Berjon
  robineko  hired gun, higher standards
  http://robineko.com/
Received on Tuesday, 8 December 2009 17:18:08 UTC

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