Must built-in prototypes also be valid instances? (Was: Why DataView.prototype object's [[Class]] is "Object"?)

Norbert Lindenberg ecmascript at norbertlindenberg.com
Tue Oct 2 21:05:42 PDT 2012


TC 39, I need decisions so that I can finish the Internationalization spec and send it to the Ecma GA:

1) Instances of Intl.Collator, Intl.NumberFormat, and Intl.DateTimeFormat currently have [[Class]] "Object". Should this change to "Collator", "NumberFormat", and "DateTimeFormat", respectively?

2) If the answer to 1) is "yes": The prototype objects of Intl.Collator, Intl.NumberFormat, and Intl.DateTimeFormat currently have [[Class]] "Object". Should this change to "Collator", "NumberFormat", and "DateTimeFormat", respectively?

3) If the answer to 1) or 2) is "no": The prototype objects of Intl.Collator, Intl.NumberFormat, and Intl.DateTimeFormat currently have all the state that allows them to be used as instances. Should they not have that state, and instead be plain objects with methods?

If I don't get votes from at least 10 of the usual TC 39 attendees within the next 24 hours, and a clear majority for change, the spec will remain as approved at the meeting two weeks ago.

Thanks,
Norbert


On Sep 29, 2012, at 23:08 , Brendan Eich wrote:

> Norbert Lindenberg wrote:
>> Last week TC 39 approved a standard defining three new built-in constructors whose instances and prototype objects all have [[Class]] "Object". Also, the prototype objects are not constructed by their respective constructors, but initialized by them, e.g., as Intl.Collator.call({}).
>> 
>> Are you suggesting they should have "Collator", "NumberFormat", and "DateTimeFormat", respectively, and the prototypes be specified as being constructed by their constructors?
> 
> All else equal, yes (sorry for not flagging these).
> 
> Any non-equal elses in sight?
> 
> /be



More information about the es-discuss mailing list