archives

« Bugzilla Issues Index

#4104 — Function object naming confusion


In the ECMAScript specification, if I understand correctly:

* `function object` is an object described in chapter 9.2

* `%Function%`, `Function constructor object`, `Function`(fix width, bold font) are built-in objects and referenced to the same thing.

* `Function object` is a `function object`, which is created by `new Function(..)` expression.

B.2.4.3 The Function object that is the initial value Date.prototype.toGMTString is the same Function object that is the initial value Date.prototype.toUTCString...

Should `Function object` changed to `function object`?


fixed in rev35 editor's draft

(In reply to coolwust from comment #0)
> In the ECMAScript specification, if I understand correctly:
>
> * `function object` is an object described in chapter 9.2

No, a "function object" is an object that supports the [[Call]] internal method. A "constructor function" (or just "constructor") is a function object that also supports [[Construct]].

added these definition to 6.1.7.2 innediately before Table 6

9.2 is about "ECMAScript function objects" which are function objects whose behavior are defined using ECMASript source code.
>
> * `%Function%`, `Function constructor object`, `Function`(fix width, bold
> font) are built-in objects and referenced to the same thing.

Not quite. `Function constructor` (usually with Function in fixed width font) and `Function` (Always in fixed width font) mean the same thing and refer to any instance of the built-in object defined in 19.2.1.

%Function% is specifically the Function constructor associated with the current Realm.

I couldn't find any occurrences of `Function constructor object`

Fixed several places where Function should be fixed-width font

>
> * `Function object` is a `function object`, which is created by `new
> Function(..)` expression.
>
> B.2.4.3 The Function object that is the initial value
> Date.prototype.toGMTString is the same Function object that is the initial
> value Date.prototype.toUTCString...
>
> Should `Function object` changed to `function object`?

yes, fixed this any serval other places where F should be f.


fixed in rev35