How do arguments objects print?

Mark S. Miller erights at
Fri Feb 27 23:59:22 PST 2009

In the 23feb09 draft, arguments objects have a [[Class]] of "Object" and
inherit their toString property from Array.prototype.
Array.prototype.toString in effect simply does "return this.join();".
However, Array.prototype.toString is not generic (it insists that its this
have [[Class]] "Array") even though Array.prototype.join() is generic.
Altogether, by the 23feb09 draft, attempting to print an arguments object
must result in a throw. I doubt this is what anyone intends. Could we simply
make Array.prototype.toString generic, so that the it works when inherited?

Btw, I notice on Safari that the [[Class]] of an arguments object is
"Arguments". Given how weird the arguments object is, if it is not too late,
I think Safari's special [[Class]] value would be a good idea.

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

More information about the Es-discuss mailing list