Module Views
David M. Lloyd
david.lloyd at redhat.com
Thu Dec 8 07:33:11 PST 2011
On 12/08/2011 12:14 AM, mark.reinhold at oracle.com wrote:
> 2011/12/7 18:54 -0800, david.lloyd at redhat.com:
>> ...
>>
>> Making views always be subordinate to the module name is the only way to make
>> this work reasonably IMO. But anyway at this point you could just as easily
>> use a general alias concept to solve the same problem.
>
> No, because views are solving an additional problem, namely that of
> exporting distinct sets of types to different clients of the same
> module.
A module alias could be made to do this as well. To solve this problem,
we create modules which simply exist to reexport a subset of another module.
This is more flexible because if an API is ever changed to be
implemented by someone else, the module basic structure can remain
unchanged. Views seem to be too tightly bound to their defining module;
to "move" a module view from one module to another (or to make the view
its own module) may be significantly more disruptive.
--
- DML
More information about the jigsaw-dev
mailing list