[Webkit-unassigned] [Bug 28117] Native JSON.stringify does not omit functions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 13 09:35:00 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=28117


Brendan Eich <brendan at mozilla.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |brendan at mozilla.org




--- Comment #21 from Brendan Eich <brendan at mozilla.org>  2009-08-13 09:34:57 PDT ---
I cited these Mozilla bug reports to Ollie over IRC:

https://bugzilla.mozilla.org/show_bug.cgi?id=61911
https://bugzilla.mozilla.org/show_bug.cgi?id=289933

We fixed the higher-numbered one first, making typeof /a/ == "function". But
then we retreated in 61911 due to complaints and (I seem to recall; it's hard
to find evidence at the moment) real web compatibility problems.

The complaints weren't all from spec-purists who did not like the extension in
SpiderMonkey that allows /a/(s) as shorthand for /a/.exec(s). I remember more
than a few places where real code was flummoxed by typeof /a/ == "function".
This confusing result broke code, whether or not such code expected (this would
have been Mozilla-specific code, originally) to be able to call a regexp as
shorthand for exec'ing it.

Anyway, we threw in the towel with the resolution of 61911. The only further
retreat for us is to remove callability, but that may be hard. We may be stuck.
We can't easily go back to typeof /a/ == "function", in any event.

/be

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list