Why do private member variables behaved like protected in the same module when creating deriving class?
12345swordy
alexanderheistermann at gmail.com
Fri Oct 26 19:12:16 UTC 2018
On Friday, 26 October 2018 at 18:45:06 UTC, Steven Schveighoffer
wrote:
> On 10/26/18 2:16 PM, 12345swordy wrote:
>> Mike Parker told me that this is intentional and not a bug.
>> However according to the spec: "Symbols with private
>> visibility can only be accessed from within the same module.
>> Private member functions are implicitly final and cannot be
>> overridden."
>> Why private member variables behave like protected member
>> variables in the same module? Can you explain your thought
>> process when it comes to this design decision Walter Bright?
>> Is there no way to mark the private member variables as
>> "final" in the same module?
>
> There's no such thing as "final" member variables.
I was referring to class member variables, not the module itself.
Sorry I didn't clarify the first time. The lack of edit function
makes things difficult for me.
More information about the Digitalmars-d
mailing list