On Saturday, 19 May 2018 at 09:10:32 UTC, KingJoffrey wrote:
On Saturday, 19 May 2018 at 08:32:28 UTC, Uknown wrote:
I ported your example to Java. Surprisingly, it compiled and
executed just fine:
All I see, is a class, with static members. How else would it
work?
This is the equivalent of my D example, in Java:
( it won't even compile. phew! )
The point was encapsulation as you defined it was broken. private
members were directly modified outside their class. In your
words, everyone was a friend.