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

Re: [WebIDL] remove modules

From: Cameron McCormack <cam@mcc.id.au>
Date: Fri, 26 Aug 2011 15:58:09 +1200
Message-ID: <4E5719D1.8010203@mcc.id.au>
To: Paddy Byers <paddy.byers@gmail.com>
CC: Marcos Caceres <marcosscaceres@gmail.com>, Bryan Sullivan <blsaws@gmail.com>, Arthur Barstow <art.barstow@nokia.com>, public-webapps@w3.org, public-script-coord <public-script-coord@w3.org>
Paddy Byers:
>> WAC does refer to interfaces defined in one module from another
>> module; however, we have not been using scoped names for these
>> references - we use the unqualified interface name. More or less
>> every WAC module does this.

Cameron McCormack:
> If WAC is already considering these names globally, and incorrectly
> referring to them without using scoped names, then it seems like they
> are not actually using the functionality that modules affords them.

WAC is using modules solely as a grouping mechanism, and not as a
namespacing mechanism, as far as I can see.  So it seems like no actual
important functionality would be lost if we dropped modules from Web
IDL.  If all you need to do is group some definitions together and give
them a name, you could simply say in your specs:

   The foo module comprises the following interfaces and exceptions: Foo,
   Bar, DontTouchThat, etc.

If WAC specs already define an interface named, for example, Element, 
then it's going to be problematic if you want to have an implementation 
that supports both that WAC spec and the DOM spec.  You can't have both 
interface objects living at window.Element.

If WAC specs define an interface named Goober, and then in the future a 
Web platform spec comes long and defines an interface named Goober, then 
that's also going to be a problem, and you could of course request the 
relevant W3C WG use a different name.

Paddy/Brian, do you agree with my assessment?

I think we should focus on the fact that Web IDL is primarily to be used
for defining Web platform features.  If other ecosystems wish to use Web
IDL, that's fine, but when there are conflicting interests we should
favour the Web.

(I think the future of JavaScript namespacing (in terms of avoiding name
clashes across independently written codebases) is going to be ES
Harmony Modules.  They're not quite done yet, but when they are then I
think it would be better to have a Web IDL module mechanism map to them.)
Received on Friday, 26 August 2011 03:59:00 GMT

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