Allen Wirfs-Brock:
> I'm still hopeful that I can eliminate [[Class]] entirely from the
> ES.next specification.
>
> What is WebIDL really trying to accomplish when it specifies class
> values. Parameterizing toString. Trademarking objects? Something else.
> All the use cases I have seen for [[class]] an be accomplished some
> other way rather than by over-loading this specification device with
> additional meanings.

All it is trying to accomplish is making
Object.prototype.toString.call(object) return the kinds of values that
websites expect.  Websites are doing that to check the type of the
object they’ve got, yes.

> See
> http://wiki.ecmascript.org/doku.php?id=strawman:es5_internal_nominal_typing
> for a sketch of what I have in mind

Being able to parameterise Object.prototype.toString is all that’d be
needed.  I suppose that can’t be done just with a self-contained Proxies
spec, but requires changes to the Object.prototype.toString definition.

-- 
Cameron McCormack ≝ http://mcc.id.au/
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to