[Bug 23532] Dealing with undefined

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 the QA Contact for the bug.

Received on Wednesday, 23 October 2013 22:02:03 UTC