Standard builtins' prototypes and toString
Allen Wirfs-Brock
allen at wirfs-brock.com
Thu Jun 12 08:42:08 PDT 2014
On Jun 12, 2014, at 8:28 AM, C. Scott Ananian wrote:
> It would be slightly more "JavaScripty" to have
> Date.prototype.[[DateValue]] exist, and be set to the epoch or some
> such.
>
> This problem actually seems to be an artifact of the way that
> [[Construct]] works in ES6 -- but the takeaway is that prototypes of a
> class are not themselves instances of the class. It's not surprising
> that methods of the class thus don't work on the prototype. I'd vote
> WONTFIX.
> --scott
TC39 explicitly agreed that we would move away from the "a prototype is an instance of its constructor" model, except where there was known legacy usage that we had to support. That previous model make it very difficult to generalize the initialization of prototype objects created via class declarations.
Allen
More information about the es-discuss
mailing list