[sv-bc] explicit package exports

From: Steven Sharp <sharp_at_.....>
Date: Wed Sep 13 2006 - 14:24:47 PDT
If we add some new syntax to control exporting symbols imported into
a package, it seems like we would want to leverage it to control
exporting symbols declared in the package also.  There may be some
local symbols that should not be visible outside the package.

The default must remain that everything in the package is exported,
for backward compatibility.  That is probably also the most commonly
desired case.  But it may be possible to keep implicitly exporting
everything declared in the package by default, while still allowing
explicit control of exporting declarations if desired.

I can see a couple of possible rules for doing this:

1. The default is only used if there are no explicit exports in the
   package.  As soon as any explicit exports are used, there are no
   implicit exports.  The only symbols exported are those that are
   explicitly exported.
   
2. The default is only used if there are no explicit exports of symbols
   local to the package.  If any symbols local to the package are
   explicitly exported, then those are the only ones exported.  So
   the default for imported symbols is that none are exported unless
   there is an explicit export for that package, in which case only the
   specified symbols are exported.  The default for local symbols is
   that all are exported unless there is an explicit export for that
   package, in which case only the specified symbols are exported.

Steven Sharp
sharp@cadence.com
Received on Wed Sep 13 14:24:51 2006

This archive was generated by hypermail 2.1.8 : Wed Sep 13 2006 - 14:25:12 PDT