Should host objects be able to have [[Class]] "Function", "Array" etc.?

David-Sarah Hopwood david.hopwood at
Thu Nov 20 01:39:13 PST 2008

Maciej Stachowiak wrote:
> On Nov 20, 2008, at 12:24 AM, David-Sarah Hopwood wrote:
>> Maciej Stachowiak wrote:
>>> On Nov 19, 2008, at 11:37 PM, David-Sarah Hopwood wrote:
>>>> Maciej Stachowiak wrote:
>>>>> On Nov 18, 2008, at 11:00 AM, Mark S. Miller wrote:
>>>>>> I also don't see a problem with David-Sarah's suggestion of
>>>>>> forbidding
>>>>>> host objects from having [[Class]] "Function". Most places in the
>>>>>> spec
>>>>>> care only about whether something is callable (has a [[Call]]
>>>>>> property), not whether it has [[Class]] "Function".
>>>>> It seems arbitrary to me that functions implemented in native code
>>>>> ("internal functions" in ECMA-262 terms)
>> There's no such thing as an "internal function", in ECMA-262 terms.
>> You presumably meant "callable host objects" here.
> No. See "10.1.1 Function Objects" in ECMA-262 3rd edition.

Yes, I corrected this in a follow-up. But internal functions by that
definition are native Function objects, so they are not relevant to
the argument about host objects. They only differ from non-internal
Function objects by having a [[Call]] method that executes non-ECMAScript
code, and by being excluded from the discussion of Execution Contexts in
chapter 10.

David-Sarah Hopwood

More information about the Es-discuss mailing list