On Fri, Jan 27, 2012 at 12:08 PM, Brendan Eich <[email protected]> wrote:
> [[Class]] begone in ES6.
>
Assuming the public facing API has no intention of breaking back
compatibility, what internal property will be read to determine the return
value of Object.prototype.toString (15.2.4.2)?
>
> Also you are making an ambiguous API. If we add class syntax and someone
> writes class string {}, which "string" is string?
>
> The "class" trope should not be mixed with "type", IMHO.
>
> /be
>
> Axel Rauschmayer <mailto:[email protected]>
>> January 27, 2012 4:27 AM
>>
>> I would still love to get read access to the [[Class]] property in
>> ES.next.
>>
>> Proposal: A function getTypeName().
>>
>> - Primitives p: return typeof p (except: "null" for null)
>> - Objects o (including functions): return o.[[Class]]
>>
>> Axel
>>
>> --
>> Dr. Axel Rauschmayer
>> [email protected] <mailto:[email protected]>
>>
>> home: rauschma.de <http://rauschma.de>
>> twitter: twitter.com/rauschma <http://twitter.com/rauschma>
>> blog: 2ality.com <http://2ality.com>
>>
>> ______________________________**_________________
>> es-discuss mailing list
>> [email protected]
>> https://mail.mozilla.org/**listinfo/es-discuss<https://mail.mozilla.org/listinfo/es-discuss>
>>
> ______________________________**_________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/**listinfo/es-discuss<https://mail.mozilla.org/listinfo/es-discuss>
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss