Michael Ang wrote:

> Brendan Eich wrote:
> 
>>> I have a simple question about IDL files.  It seems that all throughout
>>> the mozilla source, IDL files contain CIDs, ContractIDs, and often
>>> factory methods in %{C++ %} blocks.  These things correspond to a
>>> particular implementation of the interface (or, in the case of
>>> ContractIDs, to a particular class of implementations), right?
>> 
> 
> I think that putting the ContractID in the IDL file is a worthwhile
> practice.  (In the absence of a more capable Component Description
> Language.)  This makes it possible for component clients to instantiate
> a component without having to search through C++ files.
> 
> There will of course be cases where multiple ContractIDs return a
> component which implements a given interface, but in many cases today
> there is only implementation of a given interface.  So listing a
> "default" ContractID will be more helpful than not most of the time. 
> But maybe I'm missing some long term consequences...
> 
>       - Mike.

This sounds fine to me.  I assume for each interface we would
just list a generic ContractID... that would correspond to
some default implementation of the interface.  In fact, specific
implementation may choose to specialize this ContractID.

Currently, we declare ContractID's in %{C++ %} blocks even
though the ContractID applies to all languages.  This isn't
great, but then it probably doesn't really matter, right?

Darin


Reply via email to