Object.prototype.inspect ?

Garrett Smith dhtmlkitchen at gmail.com
Thu Mar 12 12:49:47 PDT 2009

On Wed, Mar 11, 2009 at 9:57 AM, Brendan Eich <brendan at mozilla.com> wrote:
> On Mar 11, 2009, at 10:33 AM, Garrett Smith wrote:

> If you mean that overriding or shadowing by assignment makes an enumerable
> property, even for a method that should not be enumerated, then ES3.1's
> Object.defineProperty allows binding a non-enumerable property.
> But I still can't tell what your point is. It seems to be unrelated to my

The point is to get the terminology correct.

The term "override" is ambiguous here. It does not differentiate
"replace X value" with "shadow X in prototype chain".

If poor terminology is used, it can be a good idea to clarify that
with better terminology. There doesn't seem to be a good reason to
take offense to that.

> question asking Tobie what the problem with overriding toSource (as opposed
> to toString, and without dragging in any unrelated problem in common to do
> with enumerability, which is irrelevant!) might be.

You did not specify whether you meant "replace the value of
Object.prototype.toSource" or create a toSource on a user-defined
object. The former would result in incompatible behavior between
implementations, including enumeration.

> /be



More information about the Es-discuss mailing list