W3C home > Mailing lists > Public > public-webapi@w3.org > March 2008

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

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 19 Mar 2008 09:31:31 +0000 (UTC)
To: Cameron McCormack <cam@mcc.id.au>
Cc: "Web APIs WG (public)" <public-webapi@w3.org>
Message-ID: <Pine.LNX.4.62.0803190930050.17076@hixie.dreamhostps.com>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 19 March 2008 09:32:15 GMT