Thread overview
"friends"
Jan 30, 2004
der_held
Jan 30, 2004
Stephan Wienczny
Jan 30, 2004
Vathix
Jan 30, 2004
Lars Ivar Igesund
January 30, 2004
What about "friend" like in C++?


January 30, 2004
der_held wrote:
> What about "friend" like in C++?
> 
> 
The docs say that you don't such! You have modules!

January 30, 2004
der_held wrote:

> What about "friend" like in C++?
>


You can access private data within the same module.

class Foo
{
  private int bar;
}

void myfriend(Foo foo)
{
  foo.bar = 1; //same module, so it's OK
}


I like this, however, I would assume in some situations you would need to do it from another module. I haven't needed to, yet.

January 30, 2004
Vathix wrote:
> der_held wrote:
> 
> I like this, however, I would assume in some situations you would need to do it from another module. I haven't needed to, yet.
>

A sign of good design! Good job :)

Lars Ivar Igesund