Please take a look at the Transparent term aliases thread, because the same applies to export
s.
There are two different uses cases for the export
keyword:
- to define members “from a template” (to copy the declaration and add a forwarding),
- to automatically import members from another object on a wildcard import.
In the first case, the definition should be opaque
, in the second - transparent. However, currently export
seems to imply opaque export
. Although “forwarding exports” can seemingly also be used as “dual of import
s”, this is an implementation detail, not the semantics, which is especially clear in IDEs.
It may be useful to formally distinguish between opaque export
s and non-opaque export
, in the same way Scala distinguishes between opaque type
s and non-opaque type
aliases. (Another option is to consider transparent export
s or inline export
s.)