Implicit coercion of Symbols

Rick Waldron waldron.rick at
Fri Jan 2 15:26:35 PST 2015

Kyle Simpson brought this up on Twitter today and I think it deserves one
last look. Here's an example of the issue:

  var sym = Symbol("description");
  sym + ""; // Throws


  var sym = Symbol("description");
  String(sym); // "Symbol(description)" *

(* appears to be the convention that implementors have converged on)

This is the only time that a "thing" in JavaScript throws when it
encounters an implicit coercion operation. This detail appears to be
problematic in that it's an unnecessary divergence from the language's
normal behaviour.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list