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

[Bug 15986] Specify exactly how and when ECMAScript arguments are evaluated

From: <bugzilla@jessica.w3.org>
Date: Mon, 20 Feb 2012 06:06:52 +0000
To: public-script-coord@w3.org
Message-Id: <E1RzMOi-00017L-BE@jessica.w3.org>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=15986

--- Comment #16 from Boris Zbarsky <bzbarsky@mit.edu> 2012-02-20 06:06:51 UTC ---
> The ones that cannot be rewritten to use only overloading with different
> argument list lengths (where shorter ones are all prefixes of the longer ones)

Why is the parenthetical a requirement?  For example, for createImageData seems
like the arg count is enough to identify the overload.  Same for
DataTransferItemList.add.

Even BlobBuilder.append could be rewritten as follows:

  void append((DOMString or Blob or ArrayBuffer) data);
  void append(DOMString text, DOMString endings);

which would allow using the arg count to select the correct one of the two
overloads....

Or is the proposal to get rid of argcount-based overloading altogether (except
for the special case optional arguments provide)?  But then you also can't
express the case from comment 10.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Monday, 20 February 2012 06:06:53 UTC

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