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

[Bug 16725] Treat omitted dictionary the same as empty dictionary

From: <bugzilla@jessica.w3.org>
Date: Wed, 23 Oct 2013 05:32:43 +0000
To: public-script-coord@w3.org
Message-ID: <bug-16725-3890-KNxiv4hdQ9@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=16725

--- Comment #12 from Cameron McCormack <cam@mcc.id.au> ---
(In reply to Olli Pettay from comment #11)
> I don't understand this.
> Now you can't have a method which requires caller to pass some dictionary.
> Or you can, but you need to add some artificial non-optional non-dictionary
> param after the dictionary.

That was by design.  Given the way that dictionaries are used, it seemed like a
good idea to require them to be optional so that authors could always omit it. 
Do you need to have the dictionary argument be non-optional because otherwise
it would e.g. interact with the rules for overloading, and you wouldn't be able
to write the API you want?  Or do you disagree with encouraging this kind of
API pattern?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Wednesday, 23 October 2013 05:32:44 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:18 UTC