A read/write __proto__ that can vanish

Waldemar Horwat waldemar at google.com
Wed Jul 16 14:12:33 PDT 2008


Ingvar von Schoultz wrote:
> Some people yearn hotly for __proto__, preferrably writable if
> at all possible, while others point to problems with security
> and software privacy.
> 
> I get the impression that this could be solved by adding a fourth
> flag among the property flags Enumerable, Writable and Flexible.
> There might be a flag called Visible, so you could make __proto__
> apparently vanish by setting Visible to false.

Adding switches like this is making code too complicated and will result in plenty of arguments about whether a particular class should have the switch turned on or off.  Often the classes you want to use will have it set the wrong way, leading to more balkanization of libraries.  In the committee we've already spent too much time discussing which properties should be enumerable, dontDelete, etc., and we still get those wrong at times.

    Waldemar



More information about the Es4-discuss mailing list