<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mediawiki.zeropage.org/index.php?action=history&amp;feed=atom&amp;title=SelfDelegation</id>
	<title>SelfDelegation - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mediawiki.zeropage.org/index.php?action=history&amp;feed=atom&amp;title=SelfDelegation"/>
	<link rel="alternate" type="text/html" href="https://mediawiki.zeropage.org/index.php?title=SelfDelegation&amp;action=history"/>
	<updated>2026-05-14T20:42:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://mediawiki.zeropage.org/index.php?title=SelfDelegation&amp;diff=84957&amp;oldid=prev</id>
		<title>Maintenance script: Repair batch-0003 pages from live compare</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.zeropage.org/index.php?title=SelfDelegation&amp;diff=84957&amp;oldid=prev"/>
		<updated>2026-03-27T00:29:10Z</updated>

		<summary type="html">&lt;p&gt;Repair batch-0003 pages from live compare&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:29, 27 March 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l31&quot;&gt;Line 31:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 31:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[SBPPSummary]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[SBPPSummary]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.zeropage.org/index.php?title=SelfDelegation&amp;diff=38984&amp;oldid=prev</id>
		<title>imported&gt;Unknown at 05:28, 7 February 2021</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.zeropage.org/index.php?title=SelfDelegation&amp;diff=38984&amp;oldid=prev"/>
		<updated>2021-02-07T05:28:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Self Delegation ==&lt;br /&gt;
앞장에 나온 두가지 질문을 상기해보자. 위임한 객체의 주체성이 필요한가? 위임한 객체의 상태가 필요한가? 이 두가지에 yes라고 대답하면 Simple Delegation을 쓸수 없다.&lt;br /&gt;
----&lt;br /&gt;
위임된 객체가 위임하는 객체에 접근하려면 가장 쉬운 한가지 방법이 있기는 하다. 바로 위임하는 객체의 참조를 가지고 있으면 된다. 하지만 복잡해지고, 깨질수도 있다.&lt;br /&gt;
----&lt;br /&gt;
여기서 제시하는 방법은, 위임하는 객체를 추가적인 파라메터로 넘기는 것이다. for라는 이름의 추가적인 파라메터로 위임하는 객체를 넘기자.&lt;br /&gt;
----&lt;br /&gt;
Self Delegation의 가장 뛰어난 예제는 Visual Smalltalk 3.0의 Dictionary구현이다. Dictionary는 각각의 상태에 대해 최적화된 HashTable을 여러개 가지고 있다. 이때, 자기 자신(Dictionary)를 넘겨주게 된다.&lt;br /&gt;
 class Dictionary&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 	void put(const T1&amp;amp;amp; keyObject, const T2&amp;amp;amp; valueObject) {&lt;br /&gt;
 		hashTable.put(keyObject, valueObject, this); // 문법 안맞는거 같다. 그냥 그런가 보다 하자.&lt;br /&gt;
 	}&lt;br /&gt;
 };&lt;br /&gt;
HashTable은 Collection으로 보낸 메세지가 뱉어낸 값을 기반으로 해쉬값을 계산한다.&lt;br /&gt;
 void HashTable::put(const T1&amp;amp;amp; keyObject, const T2&amp;amp;amp; valueObject, Dictionary* collection)&lt;br /&gt;
 {&lt;br /&gt;
 	hash = collection-&amp;amp;gt;hashOf(keyObject);&lt;br /&gt;
 	...&lt;br /&gt;
 }&lt;br /&gt;
이제 hashOf를 폴리모피즘으로 구현할 수 있다.&lt;br /&gt;
 HashTable&amp;amp;amp; Dictionary::hashOf(const T&amp;amp;amp; object) {&lt;br /&gt;
 	return object.hash();&lt;br /&gt;
 }&lt;br /&gt;
 HashTable&amp;amp;amp; IdentityDictionary::hashOf(const T&amp;amp;amp; object) {&lt;br /&gt;
 	return object.basisHash();&lt;br /&gt;
 }&lt;br /&gt;
----&lt;br /&gt;
어째 C++이 점점 미워진다. &lt;br /&gt;
----&lt;br /&gt;
[[SBPPSummary]]&lt;br /&gt;
&lt;/div&gt;</summary>
		<author><name>imported&gt;Unknown</name></author>
	</entry>
</feed>