Why we need to clean up __proto__

Mark S. Miller erights at google.com
Thu Dec 29 11:57:00 PST 2011

On Thu, Dec 29, 2011 at 9:13 AM, Allen Wirfs-Brock <allen at wirfs-brock.com>wrote:

> Personally,  given that IE as yet to support it, I think there is a good
> argument that the intersection semantics is empty and at the very least
> __proto__ in object literals  it should be banned in ES.next Harmony mode.

If we can agree that the intersection semantics is empty, then I would be
overjoyed to dispense with this whole exercise. I hate __proto__ with a
passion I can hardly express.

However, at a recent EcmaScript meeting (I think it was the November one
too), MS explained that the mobile space is currently so dominated by
browsers honoring mutable __proto__ that some popular mobile-only libraries
now rely on it. From the history of web evolution, we can understand the
pressures this creates: The authors of those libraries feel no pressure to
change, since their use of __proto__ works everywhere they care about.

By contrast, MS, currently attempting to become a mobile player, feels much
pressure to change mobile IE to be able to run these libraries. If MS
changes, it will simply change IE rather than fork mobile vs non-mobile. If
IE adopts __proto__, then the intersection semantics really becomes
standard, even if not de jure, so let's get out in front and codify what
this standard should be. That codification must include current usage of
"{__proto__:.." or, as Allen says, the whole exercise is pointless.

>From a different history of evolution, we can also think of the emergence
of a separate mobile ecosystem as occurring on the other side of a chasm,
leading to loss of genetic diversity (platforms not honoring __proto__) and
partial speciation for the portion suddenly cut off from the main
population. The chasm is not total, and the remixing of these partially
speciated sub populations is complex.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20111229/dd64fd3b/attachment-0001.html>

More information about the es-discuss mailing list