Re: [Bindings] What does typeof return for interface objects?

On Wed, 19 Mar 2008, Cameron McCormack wrote:
> 
> So really the only options are:
> 
>   * don’t say anything about [[Call]], and thus allow typeof to return
>     'object' or 'function',

I don't believe that's a real option.


>   * mandate that [[Call]] is not implemented, and thus require typeof
>     to return 'object', or
> 
>   * mandate that [[Call]] is implemented (and then say what calling the
>     function should do), thus requiring typeof to return 'function'.

Those are two possible options. There's also a third option: allow 
interfaces to define [[Call]] the same way you allow them to define 
[[Construct]], thus making this vary on a per-interface basis.


> Requiring that [[Call]] be implemented but not saying what its actual 
> behaviour should be is a bit strange, I think.

I agree that that is not an option either.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 19 March 2008 09:32:14 UTC