On Jul 18, 2013, at 8:09 AM, Brendan Eich wrote:

> Andreas Rossberg wrote:
>> On 18 July 2013 01:09, Brendan Eich<[email protected]>  wrote:
>>> Brandon Benvie wrote:
>>>> On 7/17/2013 4:02 PM, Brandon Benvie wrote:
>>>>> And this is how it currently works in the V8 implementation. The first
>>>>> thing I did testing it looked like:
>>>>> 
>>>>>     var s = new Symbol();
>>>>>     var x = {};
>>>>>     x[s] = 'test';
>>>>> 
>>>>> I was surprised to find that this threw an error instead of doing the (to
>>>>> me) obvious thing.
>>>> (And to clarify, it throws on line 3, not line 1)
>>> This is nuts.
>> 
>> May I humbly remind you that we explicitly discussed and decided this
>> at the March meeting?
> 
> If it's nuts now, it was nuts in March :-P.
> 
>>  I actually would have preferred if 'new Symbol'
>> worked, and that was what V8 implemented before the meeting.
> 
> You are right, I see this in the March 14 meeting notes. So I'm pleading 
> temporary insanity. We'll have to reestablish consensus. I will refrain from 
> more (self-)analysis ;-).
> 

No, you just need to read carefully, I remember that this is just a summary of 
the discussion, not literal quotes,  and not everything is captured:

AWB: Symbol is a factory that creates symbols, new Symbol creates instance of 
the wrapper class. (same as Number)

BE: Value objects allow "new"

AWB: I can define the Symbol[@@create] to throw


I'm pretty sure that as part of the first statement I also said that 'new 
Symbol' should not create a primitive value because that would violate the 
wrapper object pattern. 
The Synbol[@@create]] comment is another way of saying 'new Symbol' should 
throw.

There is nothing following this in the Symbols section of the minutes that 
address whether or not there are Symbol wrappers. My take-away from the meeting 
 was we would try to do Symbols as as a primitive, with a factory object named 
'Symbol', but no user visible wrapper instances.  I don't see anything in the 
minutes that says otherwise.  In fact, the conclusion/resolution doesn't even 
say that Symbols will be primitive values.  All of the bullet items listed 
there are apply equally to either symbols as primitives or symbols as exotic 
objects. The current (and previous, I believe) spec. draft reflects those 
explicit conclusions.

Allen
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to