TC39 meeting Wed 5/23/2012

John J Barton johnjbarton at johnjbarton.com
Sun May 27 17:13:20 PDT 2012


On Sun, May 27, 2012 at 4:41 PM, Brendan Eich <brendan at mozilla.com> wrote:
> John J Barton wrote:
>>
>> On Thu, May 24, 2012 at 11:10 AM, Brendan Eich<brendan at mozilla.com>
>>  wrote:
>>>
>>> David Bruant wrote:
>>>
>>>> Once we're at it, for the sake of completeness there is probably no harm
>>>> in adding a Reflect.setPrototype at this point, is there?
>>>
>>> There is, just as there's a cost to Object.setPrototypeOf (the obvious
>>> place
>>> to put it to match Object.getPrototypeOf from ES5). Mark pointed out that
>>> he'd have to delete that static method too, and from every frame that
>>> might
>>> run SES code. But when mashing up SES and non-SES code, it would be
>>> better
>>> not to break the non-SES code by such deletion.
>>>
>>> Having only the SES environment's Object.prototype.__proto__ to delete is
>>> better.
>>
>>
>> How is this this line of reasoning -- which I read as 'support for
>> SES-environments and non-SES-environments' -- not violating 1JS?
>
>
> How about you say how it violates 1JS instead of asking me to prove a
> negative?

I wasn't asking for a proof. I was just asking a question.

>
> 1JS is about no explicit version
> number/MIME-type-parameter/pragma/other-designator opt-in. Nothing to do
> with goal #5 at
> http://wiki.ecmascript.org/doku.php?id=harmony:harmony#goals, which is about
> a different language, SES, that must map efficiently to ES6 and up (and
> almost does to ES5).
>
> Subset and other transpiled language != version opt-in mandated to use ES6
> in the main language.

The reason I asked is that "use strict" seems to be a subset but acts
like another version in some cases. In particular, if a library uses
obj.freeze() and the caller modifies the object by adding a property,
the caller gets no error message. (You'll have to read the source of
the library to figure it out.) The library is, for this purpose,
operating in a language where object modification is an error but the
caller is not.

If 'mashing up' is similar to 'using objects from a library', then
isn't JS-mashed-with-SES (whatever that means) a different version of
JS?

jjb

>
> /be


More information about the es-discuss mailing list