<s>
In	O
object-oriented	B-Language
programming	I-Language
,	O
a	O
friend	B-Language
function	I-Language
,	O
that	O
is	O
a	O
"	O
friend	O
"	O
of	O
a	O
given	O
class	O
,	O
is	O
a	O
function	O
that	O
is	O
given	O
the	O
same	O
access	O
as	O
methods	O
to	O
private	O
and	O
protected	O
data	O
.	O
</s>
<s>
A	O
friend	B-Language
function	I-Language
is	O
declared	O
by	O
the	O
class	O
that	O
is	O
granting	O
access	O
,	O
so	O
friend	B-Language
functions	I-Language
are	O
part	O
of	O
the	O
class	O
interface	O
,	O
like	O
methods	O
.	O
</s>
<s>
Friend	B-Language
functions	I-Language
allow	O
alternative	O
syntax	O
to	O
use	O
objects	O
,	O
for	O
instance	O
f(x )	O
instead	O
of	O
x.f( )	O
,	O
or	O
g(x,y )	O
instead	O
of	O
x.g(y )	O
.	O
</s>
<s>
Friend	B-Language
functions	I-Language
have	O
the	O
same	O
implications	O
on	O
encapsulation	O
as	O
methods	O
.	O
</s>
<s>
A	O
similar	O
concept	O
is	O
that	O
of	O
friend	B-Application
class	I-Application
.	O
</s>
