<?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=DirectVariableAccess</id>
	<title>DirectVariableAccess - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mediawiki.zeropage.org/index.php?action=history&amp;feed=atom&amp;title=DirectVariableAccess"/>
	<link rel="alternate" type="text/html" href="https://mediawiki.zeropage.org/index.php?title=DirectVariableAccess&amp;action=history"/>
	<updated>2026-05-14T23:24:10Z</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=DirectVariableAccess&amp;diff=84313&amp;oldid=prev</id>
		<title>Maintenance script: Repair batch-0002 pages from live compare</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.zeropage.org/index.php?title=DirectVariableAccess&amp;diff=84313&amp;oldid=prev"/>
		<updated>2026-03-27T00:16:01Z</updated>

		<summary type="html">&lt;p&gt;Repair batch-0002 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:16, 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-l24&quot;&gt;Line 24:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 24:&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=DirectVariableAccess&amp;diff=31405&amp;oldid=prev</id>
		<title>imported&gt;Unknown at 05:23, 7 February 2021</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.zeropage.org/index.php?title=DirectVariableAccess&amp;diff=31405&amp;oldid=prev"/>
		<updated>2021-02-07T05:23:08Z</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;== Direct Variable Access ==&lt;br /&gt;
인스턴스 변수의 값을 어떻게 얻어오고 어떻게 셋팅해주는가?&lt;br /&gt;
----&lt;br /&gt;
초기화처럼 변수에 접근하는 방법도 큰 이슈 중 하나였다. 이것에도 두가지 방법이 있는데, 역시 패턴의 존재 이유처럼, 하나는 유연성, 또 다른 하나는 가독성이다. 첫번째 방법은 모든 변수를 직접 접근하는 것이다. 다른 하나는, 항상 메세지를 보내는 것이다.(setter,getter를 사용한다.)&lt;br /&gt;
----&lt;br /&gt;
스몰토크 진영에서는 IndirectVariableAccess를 선호했다. 그러다가 켄트아저씨가 DirectVariableAccess를 써 보고는 그것의 가독성에 놀랐다.&lt;br /&gt;
----&lt;br /&gt;
아래는 한번 보고 &amp;#039;음. 메세지 x를 보내는군&amp;#039; 하고 잠깐 생각해야 하지만,&lt;br /&gt;
 ...getX()...&lt;br /&gt;
아래는 &amp;#039;음. 그냥 x구나.&amp;#039; 할 수 있다는 것이다.&lt;br /&gt;
 ..,x...&lt;br /&gt;
----&lt;br /&gt;
와드 아저씨의 말로는, &amp;#039;클래스에 아주 적은 양의 메소드만 존재한다면, getter/setter를 추가하는 것만으로도 메소드의 수가 두배가 되어버린다. 이는 전혀 사용되지 않을 유연성을 위해 쓸데없이 갯수를 늘린 것이다.&amp;#039; 라고 한다.&lt;br /&gt;
----&lt;br /&gt;
하지만 이 클래스가 상속이 될 가능성이 있다면, setter/getter를 오버라이딩 해서 사용할수 있으므로, IndirectVariableAccess를 쓰는 것이 괜찮다.&lt;br /&gt;
----&lt;br /&gt;
변수에 직접 접근하라.&lt;br /&gt;
----&lt;br /&gt;
 void Point::setXnY(int xNumber, int yNumber)&lt;br /&gt;
 {&lt;br /&gt;
 	x = xNumber;&lt;br /&gt;
 	y = yNumber;&lt;br /&gt;
 }&lt;br /&gt;
----&lt;br /&gt;
[[SBPPSummary]]&lt;br /&gt;
&lt;/div&gt;</summary>
		<author><name>imported&gt;Unknown</name></author>
	</entry>
</feed>