@shallow
for data and constructor declarations
#38
Labels
A-name-resolution
Area: Name resolution
T-proposal
Type: Proposed feature which might not actually be accepted
The attribute
@shallow
switches from the default mode of creating a namespace containing subordinate declarations to placing those into the same namespace where the original declaration is defined in.It is semver compatible (here i.e. not a major change) for an API to go from a non-shallow data declaration to a shallow one if all constructors are (manually)
use
d in the same module and the same exposure scope of the data type. Starting out with non-shallow is thus forward compatible. The reverse is not given. Neither direction is given for (non-)shallowness on constructors since one cannotuse
inside of the constructor listing.Motivation
Less to type esp. when prototyping since one does not need to qualify paths as much or need to
use
them. No other reason. Therefore, it is quite low priority and might not even become part of the language at all.Scope
The text was updated successfully, but these errors were encountered: