Standard builtins' prototypes and toString
C. Scott Ananian
ecmascript at cscott.net
Thu Jun 12 13:42:28 PDT 2014
On Thu, Jun 12, 2014 at 3:56 PM, Mark S. Miller <erights at google.com> wrote:
> I like this list. I prefer #c.
> * We have previously succeeded at making previously non-generic methods
> generic. I think we could get away with #c.
> * It is easier for a normal JS programmer to do the equivalent of #c for
> most of their classes.
FWIW, if a change to the spec is needed, I also favor (c).
Both generic options (b) and (c) have consistent behavior that can
extend to `#valueOf`. In option (b) you would presumably invoke
`Object#valueOf` and for option (c) you'd return the "zero" value.
--scott
More information about the es-discuss
mailing list