Subj : Re: Changing Object.prototype.toSource to use double-quotes everywhere To : netscape.public.mozilla.jseng From : Brendan Eich Date : Fri May 13 2005 10:33 am Brendan Eich wrote: > Hi, your code is fine for trees, but it doesn't handle arbitrary object > graphs (neither does JSON, but you wouldn't want a "Too much recursion" > error for the edge case). Sorry, I skimmed your post to fast and noticed only after replying that you dealt with this. > Also, why not use === undefined and === null, rather than == "undefined" > and == "null" in Object.prototype.toJSONString? A JS string whose > characters are the sequence "undefined" should not be turned into the > undefined value when serialized via JSON, it seems to me. Otherwise your code is fine, and I think the only task for us is to see whether we can make a standard library, written in JS, available to all JS implementations that want to track the standard. That's what I meant in my other post about "standard library mechanism" -- it's fine to embed JS (JScript, whatever) in a Java, .NET, or other world and use that world's standard packages. But people writing portable JS, esp. for a common interoperable platform like the browser or Linux, want a set of standard packages that are named and work the same everywhere. JS has lacked this for too long, being in the browser, or in the shadow of a larger system of reusable packages such as a JVM. Nothing wrong with Rhino, mind you -- but something's missing from JS-the-language. /be .