Jan 29 TC39 Meeting Notes

David Bruant bruant.d at gmail.com
Sat Feb 9 01:17:55 PST 2013


Le 09/02/2013 00:39, Claude Pache a écrit :
> Since BC is not an issue, let's pick the semantic that is most conform to the existing Ecmascript object model, and let's not invent a "weird: true" property descriptor just because we think that __proto__ deserves one.
> The goal is to standardise the least weird thing possible. Indeed, backward-compat doesn't care.
*The* goal if any is to standardize the minimum set of properties that 
the web relies on (and Microsoft can implement to support existing 
mobile websites (ab)using __proto__).
In my opinion, a couple of properties should go along:
* it should be compulsory that __proto__ was deletable
* It would be preferable that there was no usable extractable setter 
(because it increases attack opportunities).
* it would be preferable that __proto__ doesn't work on non-extensible 
objects.

Beyond that, any detail, as long as it's localized to Object.prototype, 
is unimportant. Although __proto__ reaches the spec, it doesn't make it 
a feature people should be encouraged to use. In my opinion, the only 
thing devs should know about is that it's a de-facto standard, in the 
spec because of economical constraints and that the only thing they 
should do with it is "delete Object.prototype.__proto__" (which is why 
anything beyond "__proto__ must be deletable" is at most a preference, 
in my opinion again).

Given that the good practice is to delete __proto__, both "conforming to 
what exists in the object model" and aiming at the "least weird thing 
possible" are probably over-engineering; "magic: true" is as bad as any 
other idea.
Coin tossing is as good as any other mean to decide the details.

David


More information about the es-discuss mailing list