W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2009

Re: [WebIDL] Callback, PropertyOnly, NoInterfaceObject

From: Maciej Stachowiak <mjs@apple.com>
Date: Tue, 30 Jun 2009 21:10:34 -0700
Cc: Giovanni Campagna <scampa.giovanni@gmail.com>, "Kruessel, Steffen" <Steffen.Kruessel@fokus.fraunhofer.de>, Marcin Hanclik <Marcin.Hanclik@access-company.com>, WebApps WG <public-webapps@w3.org>, ian@hixie.ch
Message-id: <68B94309-CE06-4B35-89CD-23E91640C189@apple.com>
To: Cameron McCormack <cam@mcc.id.au>

On Jun 30, 2009, at 8:12 PM, Cameron McCormack wrote:

> Hi Steffen, Giovanni.
>
> Giovanni Campagna:
>> [Callback], despite the names, does not mean that the interface will
>> be called back by a method accepting it (although that was the  
>> initial
>> use case). It barely means that you can convert an Object (in the
>> ECMAScript sense) to an object in the WebIDL sense, of that  
>> interface.
>
> I agree with everything Giovanni said.
>
> Regarding the name of the extended attribute: it used to be called
> [NativeObject], but there were restrictions on it so that it could  
> only
> be used on interfaces with operations (and not attributes).  Ian then
> requested it be renamed to [Callback], since that was more  
> descriptive.
> Since that restriction has now been lifted, and [Callback] interfaces
> can have attributes, I agree that [Callback] isnít the most obvious  
> name
> any more.
>
> Anybody object to renaming it back to [NativeObject] then (or can
> suggest a better name)?

The name NativeObject seems nondescriptive and could easily be taken  
as the opposite of what it means. For example, in the browser context,  
code written in C++ is often called "native" but code written in  
JavaScript typically is not. But "NativeObject" would be applied to  
interfaces that are expected to be implemented in JavaScript, perhaps  
even just by specifying a function directly.

I'm not sure if there is a better word than "Callback" to connote an  
interface that is expected to be implemented by clients of the API  
rather than implementation of the API. Maybe "ClientInterface" or  
"ClientObject".

Regards,
Maciej
Received on Wednesday, 1 July 2009 04:11:14 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:32 GMT