Re: [WebIDL] remove modules

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:58:52 UTC