- From: <bugzilla@jessica.w3.org>
- Date: Mon, 13 Jun 2011 21:18:20 +0000
- To: public-script-coord@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=12798
--- Comment #12 from Brendan Eich <brendan@mozilla.org> 2011-06-13 21:18:20 UTC ---
(In reply to comment #8)
> But this kind of common API doesn't magically convert null to "null".
>
> var o = {
> _a : "foo",
> setA: function(v) {
> this._a = v;
> },
> getA: function(v) {
> return this._a;
> }
> }
>
> var value = null;
> o.setA(value);
> alert(value == o.getA());
There is no conversion here at all!
I don't see how this argue for null -> "" or null -> "null".
OTOH, the + operator with string on left or right, String called as function,
parseInt/parseFloat convering their argument to string, all use ECMA-262's
ToString, which does null -> "null".
/be
--
Configure bugmail: http://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, 13 June 2011 21:18:22 UTC