Why do private member variables behaved like protected in the same module when creating deriving class?

12345swordy alexanderheistermann at gmail.com
Sat Oct 27 02:49:00 UTC 2018


On Saturday, 27 October 2018 at 01:54:24 UTC, unprotected-entity 
wrote:

> D is not an object-oriented langauges - although it does have 
> classes.

It like you never read the overview
https://dlang.org/overview.html
or the wiki
https://en.wikipedia.org/wiki/D_(programming_language)

> If you want the 'information hiding' capabilities that 
> object-oriented languages offer to classes, then use an 
> object-oriented language.

D IS an object-oriented language as much as c++, just not a pure 
one.

> Many come to D from object-oriented languages, and expect 
> classes to operate in the same way in D, as they did in those 
> languages. It aint going to happen - in D. Why?

"Have a short learning curve for programmers comfortable with 
programming in C, C++ or Java."
Gee, I wonder why?

> Really, you are better off using a language that does what *you 
> want* it to do, instead of getting the language to change it's 
> concept of the modular unit.
You didn't read the dip that I wrote did you? Nowhere in the dip 
did I change the concept of the modular unit. I just remove the 
one module per file Limination. That is it.




More information about the Digitalmars-d mailing list