On Thu, Feb 19, 2015 at 12:56 PM, Allen Wirfs-Brock <al...@wirfs-brock.com>
wrote:

>
> On Feb 19, 2015, at 12:09 PM, Andrea Giammarchi wrote:
>
> > if we'd like to have Array.empty, Function.empty, String.empty and
> friends, what's wrong with having these as we always had already: as
> prototypes?
>
> Just to keep things focused. *.empty is not something that is on the table
> for ES6.  It would have to go into the ES7 track.
>
> Today's issue, is
>
> 1) do we need to revert Array.prototype to being an Array exotic object
> (I think we do)
>
> 2) do we need to revert RegExp.prototype to being a RegExp instance.(with
> initialize RegExp internal slots)
> (maybe not, and alternatively I have very minor tweaks to the exec and
> test methods that will maintain the most likely such legacy
> RegExp.prototype uses without needing those internal slots)


RegExp.prototype.compile
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.compile
is a visible side effect that survives Object.freeze. It is only not a
global communications channel because there is no longer a primordial
RegExp instance. So we cannot consider making RegExp.prototype a RegExp
unless Object.freeze must disable RegExp.prototype.compile on RegExp
instances.



-- 
    Cheers,
    --MarkM
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to