protected
and protect_proj
user attributes
protected
is an attribute to protect a declaration.
If a declaration foo.bar
is marked protected, then it must be referred to
by its full name foo.bar
, even when the foo
namespace is open.
protect_proj
attribute to protect the projections of a structure.
If a structure foo
is marked with the protect_proj
user attribute, then
all of the projections become protected.
protect_proj without bar baz
will protect all projections except for bar
and baz
.
Examples
In this example all of foo.bar
, foo.baz
and foo.qux
will be protected.
The following code example define the structure foo
, and the projections foo.qux
will be protected, but not foo.baz
or foo.bar
Attribute to protect a declaration.
If a declaration foo.bar
is marked protected, then it must be referred to
by its full name foo.bar
, even when the foo
namespace is open.
Protectedness is a built in parser feature that is independent of this attribute.
A declaration may be protected even if it does not have the @[protected]
attribute.
This provides a convenient way to protect many declarations at once.
Attribute to protect the projections of a structure.
If a structure foo
is marked with the protect_proj
user attribute, then
all of the projections become protected, meaning they must always be referred to by
their full name foo.bar
, even when the foo
namespace is open.
protect_proj without bar baz
will protect all projections except for bar
and baz
.