<s>
In	O
software	B-General_Concept
engineering	I-General_Concept
,	O
the	O
delegation	B-Language
pattern	I-Language
is	O
an	O
object-oriented	B-Language
design	O
pattern	O
that	O
allows	O
object	B-Language
composition	I-Language
to	O
achieve	O
the	O
same	O
code	O
reuse	O
as	O
inheritance	B-Language
.	O
</s>
<s>
In	O
delegation	B-Application
,	O
an	O
object	O
handles	O
a	O
request	O
by	O
delegating	O
to	O
a	O
second	O
object	O
(	O
the	O
delegate	O
)	O
.	O
</s>
<s>
The	O
delegate	O
is	O
a	O
helper	B-Application
object	I-Application
,	O
but	O
with	O
the	O
original	O
context	O
.	O
</s>
<s>
With	O
language-level	O
support	O
for	O
delegation	B-Application
,	O
this	O
is	O
done	O
implicitly	O
by	O
having	O
self	B-Application
in	O
the	O
delegate	O
refer	O
to	O
the	O
original	O
(	O
sending	O
)	O
object	O
,	O
not	O
the	O
delegate	O
(	O
receiving	O
object	O
)	O
.	O
</s>
<s>
Note	O
that	O
"	O
delegation	B-Application
"	O
is	O
often	O
used	O
loosely	O
to	O
refer	O
to	O
the	O
distinct	O
concept	O
of	O
forwarding	B-Application
,	O
where	O
the	O
sending	O
object	O
simply	O
uses	O
the	O
corresponding	O
member	O
on	O
the	O
receiving	O
object	O
,	O
evaluated	O
in	O
the	O
context	O
of	O
the	O
receiving	O
object	O
,	O
not	O
the	O
original	O
object	O
.	O
</s>
<s>
Note	O
that	O
this	O
article	O
uses	O
"	O
sending	O
object/receiving	O
object	O
"	O
for	O
the	O
two	O
objects	O
,	O
rather	O
than	O
"	O
receiving	O
object/delegate	O
"	O
,	O
emphasizing	O
which	O
objects	O
send	O
and	O
receive	O
the	O
delegation	B-Application
call	O
,	O
not	O
the	O
original	O
call	O
.	O
</s>
<s>
1994	O
,	O
delegation	B-Application
is	O
defined	O
as	O
:	O
</s>
<s>
In	O
the	O
example	O
below	O
(	O
using	O
the	O
Kotlin	B-Language
programming	I-Language
language	I-Language
)	O
,	O
the	O
class	O
Window	O
delegates	B-Application
the	O
area( )	O
call	O
to	O
its	O
internal	O
Rectangle	O
object	O
(	O
its	O
delegate	O
)	O
.	O
</s>
<s>
Some	O
languages	O
have	O
special	O
support	O
for	O
delegation	B-Application
built	O
in	O
.	O
</s>
<s>
For	O
example	O
,	O
in	O
the	O
Kotlin	B-Language
programming	I-Language
language	I-Language
,	O
we	O
could	O
write	O
:	O
</s>
