Automatic export of identifiers from the definition module
Ahj Sale · UTAS Research Repository · 1987
The BSI Modula-2 Working Group has suggested that Professor Wirth's proposal to discard the export list of a definition module be rejected (Cornelius, 1986). In their report to the Modula-2 Users Association the Working Group state ‘[WG084] M2WG has agreed to retain the original syntax and semantics, ie objects which are to be exported from a definition module have to be listed in an export list.’ This paper argues that this suggestion should not be adopted and that the 1984 revision to automatically export all identifiers declared in a definition module should be retained. ANALYSIS Several correspondents to the MODUS Quarterly (November 86) have pointed out that few if any definition modules export identifiers selectively. This provides a strong prima facie case for assuming that the export clause in a definition module is redundant. There is also a strong case on theoretical and consistency grounds for rejecting selective export. However a more careful analysis of the situation is required to ensure that some unusual but important facility is not being overlooked by deleting it. Accordingly this paper will systematically examine the arguments for and against selective export. In the ensuing discussion the word visible (and its derivatives) will be meant to refer to an item being readable in the text of the definition module, and the term accessible to refer to an ability to refer to the item by imported identifier in a using module. Firstly, we should ask when an identifier must appear in a definition module. Assume that the valid reasons for an identifier