Read access to [[Class]]?

Rick Waldron waldron.rick at gmail.com
Fri Jan 27 09:59:34 PST 2012


On Fri, Jan 27, 2012 at 12:08 PM, Brendan Eich <brendan at mozilla.org> 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:axel at rauschma.de>
>> 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
>> axel at rauschma.de <mailto:axel at rauschma.de>
>>
>> home: rauschma.de <http://rauschma.de>
>> twitter: twitter.com/rauschma <http://twitter.com/rauschma>
>> blog: 2ality.com <http://2ality.com>
>>
>> ______________________________**_________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/**listinfo/es-discuss<https://mail.mozilla.org/listinfo/es-discuss>
>>
> ______________________________**_________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/**listinfo/es-discuss<https://mail.mozilla.org/listinfo/es-discuss>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120127/e3251c57/attachment-0001.html>


More information about the es-discuss mailing list