Difference (last change)
, normal page display
Protection Attribute of D language is one of "public", "protected", "package","private" and "export".|
"export" is used at out of executable, we do not talk about it.
Protection Attribute of D language is one of public, protected, package,private and export.|
export is used at out of executable, we do not talk about it.
Protection Attribute of D language is one of public
is used at out of executable, we do not talk about it.
Protection Attribute can used in three place according to grammer-diagram: module member, class member and inheriting. But from now on, inheriting attribute is no effort(or does not implement).
For a module:
|Proctected Attribute||Other||Package member||Self|
Modules do not inherit, they have no super modules, and offical spec of D language say proctected attribute in module is illegeal, but implement make it an synonym of public.
For a class
|Proctected Attribute||Other||Package member||Child||Module member||Nested class||Self|
|Public||accessibly accessibly||accessibly||accessibly||accessibly||accessibly|| |
- class in a module is always public! You can't declare private class or package class.(Strange!)
- Default protected attribute is public, means if protected attribute is absent, public attribute take place.