[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposal: An OOC Package Tool





"Peter H. Froehlich" wrote:
>    We have also thought about a "truely hierarchical" namespace, however
> that would introduce subtle problems regarding the strict encapsulation we
> require modules to support. It all centers around the question whether
> identifiers from "upper level" modules should be useable *implicitly*
> within "lower level" modules. This would be in line with usual scoping
> rules (as used for procedures) however it would clearly also break
> encapsulation. If on the other hand implicit access is not allowed, what is
> the point of having "nested modules" in that form in the first place?

I like the 'IMPORT CO := edu.uci.ics.lagoona.core.Collections' construct, and
really wish that Java allowed one to alias the imported packages and classes in
this way.  But I respectfully disagree with my colleague Peter on the
hierarchical namespace issue.  Inner scopes, and the accessibility of enclosing
symbols that they entail, should be there for developers to take advantage of
if they want.  Hierarchy is a powerful abstraction tool.  If, on the other
hand, they really want encapsulation, they could either tag stuff in the
enclosing scopes as PRIVATE (although I don't think this is in Lagoona,
right?), or simply avoid package nesting altogether.

As far as versioning, what is wrong with saying ''IMPORT CO :=
edu.uci.ics.lagoona.core.Collections.Version-7.0.1'?  Later on, one can change
the version suffix and recompile.  You can even pull in multiple versions of
the same package (well, several packages, really), and give all of them
different aliases...

Zem Laski