Default @@toStringTag for user classes

Michał Wadas michalwadas at
Tue Dec 2 09:45:04 PST 2014

The difference between "[Object Point]" and "[Object Set]" is fundamental.
Your application would not change any behavior without explicit creating
"new Set".
But changing behavior of existing code is something different - it can
introduce subtle bugs in enclosed environment.
2 gru 2014 13:03 "Claude Pache" <claude.pache at> napisał(a):

> Le 2 déc. 2014 à 09:04, Michał Wadas <michalwadas at> a écrit :
> It probably would be backward incompatible change. Too much code depends
> on [Object Object].
> I'm curious to know what sort of code would be broken by
> ` === "[object Point]"` for instances `x` of some
> user-defined class? and whether it is not already broken by, say,
> ` Set) === "[object Set]"`?
> —Claude
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list