[m-dev.] Submodule visibility rules
Ralph Becket
rafe at cs.mu.OZ.AU
Tue Jul 2 10:29:54 AEST 2002
I'm sketching out the section of the tutorial on modules.
Looking up the reference manual on visibility rules for submodules, it
says that *everything* that is defined or declared in a parent module is
visible *everywhere* in a submodule.
A quick test shows this to be true.
However, the rule seems odd to me since if a client is allowed to import
the submodule then it can gain access to names that are local to the
parent module.
I would have thought that the following rule would be better:
place where | names in parent module visible in submodule
submodule is |
included in parent | interface implementation
|
interface | yes no
|
implementation | yes yes
Any opinions?
- Ralph
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list