On Friday, 30 March 2012 at 01:55:23 UTC, Nick Sabalausky wrote:
<wishful musing>I've been starting to think
more and more that the "everything in a module is a friend" was
a mistake,and that we should have instead just had a "module"
access specifier like we have "package".</wishful musing>
Or, for moar compatibility, have enemy functions.
class Klingon { private Starship commanding; }
void nonFriend(enemy Klingon kor) {
kor.commanding = lol; // error, commanding is private and kor
is an enemy
}
Or, to avoid having a new keyword, call it interface
instead of enemy.
Though, then you could just pass an interface instead of
a class too. Take most general possible type.
But, separate modules are kinda cool anyway. I often put
stuff together in one module just for ease of distribution,
but eh modules are cool.