Read access to [[Class]]?

Brendan Eich brendan at mozilla.org
Fri Jan 27 09:08:41 PST 2012


[[Class]] begone in ES6.

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


More information about the es-discuss mailing list