Speaking of Lisp...
peterjoel at gmail.com
Sat Jan 6 08:18:20 PST 2007
On 1/6/07, Brendan Eich <brendan at mozilla.org> wrote:
> On Jan 5, 2007, at 6:59 PM, Chris Double wrote:
> > Although 'hasOwnProperty' can be used to avoid this it doesn't work in
> > all cases. For example, in Firefox all objects return true for
> > hasOwnProperty('__proto__').
> Indeed, __proto__ appears to be a property of every object in
> SpiderMonkey. It's "DontEnum" in ECMA terms, so it does not pollute
> for-in loops, but it's still a hazard reduced in risk only by the __
It's also "DontDelete". It's not ReadOnly though, but setting it to
null probably isn't enough.
Irrelevent, but I think interesting, in ActionScript 1 and 2 there is
a bug which means you can create an object without a __proto__ by
using o=Object() instead of o=new Object(). But AS1+2 let you toggle
the DontDelete flag anyway, with undocumented functions.
More information about the Es4-discuss