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

[Bug 23532] Dealing with undefined

From: <bugzilla@jessica.w3.org>
Date: Wed, 23 Oct 2013 22:02:01 +0000
To: public-script-coord@w3.org
Message-ID: <bug-23532-3890-1U96XyH1Jm@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=23532

Jonas Sicking <jonas@sicking.cc> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jonas@sicking.cc

--- Comment #26 from Jonas Sicking <jonas@sicking.cc> ---
Though the same could probably be said for calling func(undefined). That seems
likely to have happen due to code like

function doStuff(a) {
  ...
  func(a);
  ...
}
doStuff();

or

function doStuff(a) {
  ...
  func(a.value);
  ...
}
doStuff({ x: 12, y: 13 });


I can't say I have a strong opinion here. I still dislike the idea of having a
split between old and new functions, but maybe it's better than the
alternative.

One possible out would be to add warnings whenever undefined is passed to a
required argument. And then slowly try to migrate old APIs to the new
convention. But it sounds like bz's appetite is pretty low for that which I can
understand given the amount of web-breaking experiments he's been through
lately.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Wednesday, 23 October 2013 22:02:03 UTC

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