name property for built-in functions??

Allen Wirfs-Brock Allen.Wirfs-Brock at
Mon Mar 9 11:37:10 PDT 2009

>-----Original Message-----
>From: es-discuss-bounces at [mailto:es-discuss-
>bounces at] On Behalf Of David-Sarah Hopwood
>I don't see why this is an interaction between 'name' and 'toString'.
>Isn't this issue independent of whether 'name' is present?
Yes, but it was the existence of the name property that motivated us to assign function names for getters/setters, binde, and new functions. In addition, the opinions expressed on this thread seem to lean towards the value of the name property also showing up as the function name in the toString result.

There are enough issues about the name property that I'm going to assume that it will be dropped from ES3.1, so I'm going to prepare a set of changes that will remove it.

A related but separable issue as to whether the existing definition of Function.prototype.toString should be embellished to say something about the name used in the "implementation-dependent representation".  Assuming we are dropping the name property and will target this sort of functionality for post ES3.1. I'm inclined to just leave toString alone for ES3.1.


More information about the Es-discuss mailing list