Comments to the JSON related proposals

Brendan Eich brendan at
Mon Aug 20 13:33:29 PDT 2007

On Aug 20, 2007, at 7:57 AM, Kris Zyp wrote:

>> question arises: How would ad-hoc transient properties be set or
>> initialized in any old object?
> With classes being available, why not provide a pathway for  
> developers to
> define transience correctly in proper OO manner that would be  
> serialization
> method agnostic, rather than adding a blacklisted array parameter to
> toJSONString, which IMHO is very poor and shortsighted way of defining
> transient/temporary keys?

Proper OO beliefs aside, you could justify lots of annotations other  
than type annotations for things like serialization, documentation,  
etc. We have a deferred proposal for documentation, for example:

So yeah, one might want both

class Foo {
   transient var bar:


let obj = {transient baz: 42, ... };

> I thought that dropping namespace qualifier had already been  
> decided on.

We're not done with this proposal, and anyway we revisit decisions  
when there's good reason.

> Is
> this still in question? I certainly agree that dropping namespaces  
> seems
> dangerous, and when I asked before it was suggested that there  
> could just
> simply be multiple identical keys in a JSON serialization output.  
> Seems a
> little odd to stringify to something that is not even coherent JSON.

I agree.


More information about the Es4-discuss mailing list