archives

« Bugzilla Issues Index

#2149 — 22.2.1: .name property for %TypedArray%


The .name property for %TypedArray% intrinsic function does not seem to be covered by the naming rules in clause 17:

> Every built-in Function object, including constructors, that is not
> identified as an anonymous function has a name property whose value
> is a String. Unless otherwise specified, this value is the name that
> is given to the function in this specification.

%TypedArray% is not given a name and it's not identified as an anonymous name.


(In the second paragraph of 22.2.1, "TypedArray" is written in fixed-width font, which may imply that this is the expected name, but that actually seems to be a formatting issue. See also third paragraph of 22.2.4, where "TypedArray" is written in fixed-width font instead of the expected italic font type.)


I think "TypedArray" is the best name for it, even though that doesn't exist as a global binding. It can be thought of as named function expression. Defined that in 22.2.2

Also added text about the name property of the individual typed array constructors in 22.2.5


fixed in rev21 draft