Re: Comments to the JSON related proposals
On 8/21/07, Brendan Eich [EMAIL PROTECTED] wrote: On Aug 21, 2007, at 1:24 AM, zwetan wrote: +1 for being able to set the attributes but I think we should not add a TRANSIENT attributes for ES3, DONTENUM should be enought and backward compatible See http://wiki.ecmascript.org/doku.php?id=proposals:enumerability ok, but is it still at the proposal stage or does DontEnum() and DontDelete() are accepted :) ? also to be complete a ReadOnly() could also be usefull, I mean also in the context of JSON serialization/deserialization to protect some properties to be overriden by the parsing of a JSON string use case: a config file with protected properties you could load a JSON string to change the configuration but some parameters would just be protected by the ReadOnly() it could even be more efficient than a whitelist or blacklist zwetan ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss
Re: Comments to the JSON related proposals
but I think we should not add a TRANSIENT attributes for ES3, DONTENUM should be enought and backward compatible See http://wiki.ecmascript.org/doku.php?id=proposals:enumerability If we added the ability to set attributes, the propertyIsEnumerable extra parameter proposal would be unnecessary (albiet convenient). Also, IMHO, transient and dontenum are different concepts. They both affect enumeration, but one in the context of introspection and one in the context of serialization. Kris ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss
Re: Comments to the JSON related proposals
On Aug 21, 2007, at 1:36 PM, zwetan wrote: On 8/21/07, Brendan Eich [EMAIL PROTECTED] wrote: On Aug 21, 2007, at 1:24 AM, zwetan wrote: +1 for being able to set the attributes but I think we should not add a TRANSIENT attributes for ES3, DONTENUM should be enought and backward compatible See http://wiki.ecmascript.org/doku.php?id=proposals:enumerability ok, but is it still at the proposal stage or does DontEnum() and DontDelete() are accepted :) ? Not likely. We aren't adding more properties if we can help it. DontDelete is dangerous -- it is necessary for integrity properties on which security depends, unlike DontEnum. also to be complete a ReadOnly() could also be usefull, Also bad news for integrity. I mean also in the context of JSON serialization/deserialization to protect some properties to be overriden by the parsing of a JSON string JSON is not being extended, but we have let obj = {const FOO: 42, ...}; so you can make read-only properties in object initialisers. /be ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss