> -----Original Message----- > From: Kris Zyp [mailto:[EMAIL PROTECTED] > Sent: 13. mars 2008 18:14 > To: Lars Hansen; Mark S. Miller > Cc: [email protected] > Subject: Deleting Getters and Setters (was Re: Controlling > DontEnum...) > > > the fact; getters and setters defined by an object initializer or in a > > class are fixtures and hence not deletable. > > Really, that doesn't create a compatibility problem? I > realize getters and setters aren't in ES3, but this seems > like ES4 would be making a significant departure in behavior > from the majority of current browser implementations of the > same getter/setter syntax used by ES4: > >>> obj = {get foo() { return 'hi' }} > Object foo=hi > >>> obj.foo > "hi" > >>> delete obj.foo > true > >>> obj.foo = 'goodbye' > "goodbye" > >>> obj.foo > "goodbye" > > With ES4, obj.foo would still be returning "hi" at the end? > That sounds nice, but is there no fear of compatibility > issues with that?
It's an interesting point. The proposal is here: http://wiki.ecmascript.org/doku.php?id=proposals:getters_and_setters but does not mention deletion (either way). Brendan, opinions? --lars _______________________________________________ Es4-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es4-discuss
