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

Re: occam: "inability to encapsulate objects"(?)



Tom wrote:

> Surely 'flat namespace' refers to the lack of structure in the global 
> namespace. I.e. there's nothing like Java's packages.

Yes - separate compilation currently produces just a flat set of process
names.  If you link is two separately compiled files whose name lists
intersect, the Unix linker used by KRoC will complain.  With the old
transputer linker, I think the declaration from the file #USEed last
hid any earlier declarations - which is the correct occam semantics.

For occam3, Geoff proposed a LIBRARY mechanism for giving user-chosen
names to separately compiled units, so that name clashes could be
properly managed.

Within a single compilation unit, current occam does - of course - provide
a strong block-structured namespace.

Peter.