Comments to the JSON related proposals

Brendan Eich brendan at mozilla.org
Tue Aug 21 14:40:28 PDT 2007


On Aug 21, 2007, at 1:36 PM, zwetan wrote:

> On 8/21/07, Brendan Eich <brendan at mozilla.org> 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



More information about the Es4-discuss mailing list