Mark S. Miller wrote:
Security aside, given maximin

    class Foo

what do you suggest Foo.prototype be?

If classes are sugar for constructor functions, an Object instance, just as you'd get for

  function Foo(){}
  Foo.prototype

There has always been an unsightly difference between built-in constructors and user-defined ones. Whether or how we reduce that gulf is separable from what the [[NativeBrand]] or [[Class]] of a built-in's prototype should be.

When self-hosting built-ins, this matters. Suppose [[NativeBrand]] could be a symbol private to the built-ins. That would allow the engine to set up bespoke-looking prototypes as it needs to for ES1-5 compatibility. But should user-defined classes have access to this symbol?

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to