<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: “Elements of Programming” Chapter&#160;3 Preview</title>
	<atom:link href="http://cpp-next.com/archive/2010/03/eop-ch3-preview/feed/" rel="self" type="application/rss+xml" />
	<link>http://cpp-next.com/archive/2010/03/eop-ch3-preview/</link>
	<description>The next generation of C++</description>
	<lastBuildDate>Mon, 30 Apr 2012 15:07:48 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: learner</title>
		<link>http://cpp-next.com/archive/2010/03/eop-ch3-preview/comment-page-1/#comment-600</link>
		<dc:creator>learner</dc:creator>
		<pubDate>Wed, 21 Jul 2010 21:53:21 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=1195#comment-600</guid>
		<description>&lt;p&gt;Hi friends...is this thread still alive ?
I am interesting a lot !!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi friends&#8230;is this thread still alive ?
I am interesting a lot !!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Parent</title>
		<link>http://cpp-next.com/archive/2010/03/eop-ch3-preview/comment-page-1/#comment-599</link>
		<dc:creator>Sean Parent</dc:creator>
		<pubDate>Fri, 30 Apr 2010 23:23:51 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=1195#comment-599</guid>
		<description>&lt;p&gt;Yes - And I agree that it could be made more clear in the book. Perhaps with stronger wording when the term partial is introduced on page 17 and add an exercise in chapter 3 to relate the definition space of an op to associativity. This could also been done in chapter 2 - much of the code in that chapter is carefully written to stay within the definition space of the operations.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Yes &#8211; And I agree that it could be made more clear in the book. Perhaps with stronger wording when the term partial is introduced on page 17 and add an exercise in chapter 3 to relate the definition space of an op to associativity. This could also been done in chapter 2 &#8211; much of the code in that chapter is carefully written to stay within the definition space of the operations.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Piotr Jachowicz</title>
		<link>http://cpp-next.com/archive/2010/03/eop-ch3-preview/comment-page-1/#comment-598</link>
		<dc:creator>Piotr Jachowicz</dc:creator>
		<pubDate>Wed, 28 Apr 2010 06:32:59 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=1195#comment-598</guid>
		<description>&lt;p&gt;If I get you correctly, you&#039;ve said that my example is invalid because operator+(INT_MAX, INT_MAX) is not valid expression because arguments are not in definition space?&lt;/p&gt;

&lt;p&gt;It is good point, but IMHO it should be explicit stated in the book.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>If I get you correctly, you&#8217;ve said that my example is invalid because operator+(INT_MAX, INT_MAX) is not valid expression because arguments are not in definition space?</p>

<p>It is good point, but IMHO it should be explicit stated in the book.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Parent</title>
		<link>http://cpp-next.com/archive/2010/03/eop-ch3-preview/comment-page-1/#comment-597</link>
		<dc:creator>Sean Parent</dc:creator>
		<pubDate>Tue, 27 Apr 2010 22:51:16 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=1195#comment-597</guid>
		<description>&lt;p&gt;operator+ on  int is a partial function. The book doesn&#039;t track the definition space through all of the operations, instead it assumes we are dealing with partial models and we say that operator+ is associative in those cases where it is defined and push the requirement back as a precondition to operator+. This is called out back on page 17 (and the example of + on int is used) and discussed a bit more on page 70. Early drafts of the book where littered with checks for the definition space, but they add little since we are dealing with partial operations so often. Partiality is only called out explicitly in a few cases. Much of the discussion back in chapter 2 is about carefully managing the precondition that the operands must stay within the definition space of the function.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>operator+ on  int is a partial function. The book doesn&#8217;t track the definition space through all of the operations, instead it assumes we are dealing with partial models and we say that operator+ is associative in those cases where it is defined and push the requirement back as a precondition to operator+. This is called out back on page 17 (and the example of + on int is used) and discussed a bit more on page 70. Early drafts of the book where littered with checks for the definition space, but they add little since we are dealing with partial operations so often. Partiality is only called out explicitly in a few cases. Much of the discussion back in chapter 2 is about carefully managing the precondition that the operands must stay within the definition space of the function.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Piotr Jachowicz</title>
		<link>http://cpp-next.com/archive/2010/03/eop-ch3-preview/comment-page-1/#comment-596</link>
		<dc:creator>Piotr Jachowicz</dc:creator>
		<pubDate>Tue, 27 Apr 2010 22:01:35 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=1195#comment-596</guid>
		<description>&lt;p&gt;[latex]op(a,b) = a + b[/latex] seems to me not associative on int because there exists a,b,c of type int such that [latex] ((a + b) + c)  != (a + (b + c))[/latex]. For example [latex]a[/latex] = INT_MAX, [latex]b[/latex] = INT_MAX, [latex]c[/latex] = INT_MIN&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p><img src="http://cpp-next.com/wp-content/ql-cache/quicklatex.com-b63c36087a6f1f5c986e2d8c88bb0d8c_l3.png" class="ql-img-inline-formula" alt="&#111;&#112;&#40;&#97;&#44;&#98;&#41;&#32;&#61;&#32;&#97;&#32;&#43;&#32;&#98;" title="Rendered by QuickLaTeX.com" style="vertical-align: -4px;"/> seems to me not associative on int because there exists a,b,c of type int such that <img src="http://cpp-next.com/wp-content/ql-cache/quicklatex.com-86b4b90ba5c8efd29b9088c4e0b2cef1_l3.png" class="ql-img-inline-formula" alt="&#32;&#40;&#40;&#97;&#32;&#43;&#32;&#98;&#41;&#32;&#43;&#32;&#99;&#41;&#32;&#32;&#33;&#61;&#32;&#40;&#97;&#32;&#43;&#32;&#40;&#98;&#32;&#43;&#32;&#99;&#41;&#41;" title="Rendered by QuickLaTeX.com" style="vertical-align: -4px;"/>. For example <img src="http://cpp-next.com/wp-content/ql-cache/quicklatex.com-5c53d6ebabdbcfa4e107550ea60b1b19_l3.png" class="ql-img-inline-formula" alt="&#97;" title="Rendered by QuickLaTeX.com" style="vertical-align: 0px;"/> = INT_MAX, <img src="http://cpp-next.com/wp-content/ql-cache/quicklatex.com-f56d50c26583f9a035ff6b4e3c0ca5c0_l3.png" class="ql-img-inline-formula" alt="&#98;" title="Rendered by QuickLaTeX.com" style="vertical-align: 0px;"/> = INT_MAX, <img src="http://cpp-next.com/wp-content/ql-cache/quicklatex.com-41a04eeea923a1a0c28094a8a4680525_l3.png" class="ql-img-inline-formula" alt="&#99;" title="Rendered by QuickLaTeX.com" style="vertical-align: 0px;"/> = INT_MIN</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Ruzon</title>
		<link>http://cpp-next.com/archive/2010/03/eop-ch3-preview/comment-page-1/#comment-595</link>
		<dc:creator>Mark Ruzon</dc:creator>
		<pubDate>Mon, 26 Apr 2010 21:36:13 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=1195#comment-595</guid>
		<description>&lt;p&gt;That should say &quot;op is associative on integers.&quot;  The + sign was munged, sorry.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>That should say &#8220;op is associative on integers.&#8221;  The + sign was munged, sorry.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Ruzon</title>
		<link>http://cpp-next.com/archive/2010/03/eop-ch3-preview/comment-page-1/#comment-594</link>
		<dc:creator>Mark Ruzon</dc:creator>
		<pubDate>Mon, 26 Apr 2010 21:35:15 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=1195#comment-594</guid>
		<description>&lt;ul&gt;
&lt;li&gt;is associative on integers.  It is partially associative on char.  The definition of associativity in Ch. 3 implicitly refers to abstract entities and not concrete types.&lt;/li&gt;
&lt;/ul&gt;
</description>
		<content:encoded><![CDATA[<ul>
<li>is associative on integers.  It is partially associative on char.  The definition of associativity in Ch. 3 implicitly refers to abstract entities and not concrete types.</li>
</ul>
]]></content:encoded>
	</item>
	<item>
		<title>By: Piotr Jachowicz</title>
		<link>http://cpp-next.com/archive/2010/03/eop-ch3-preview/comment-page-1/#comment-593</link>
		<dc:creator>Piotr Jachowicz</dc:creator>
		<pubDate>Tue, 20 Apr 2010 06:30:49 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=1195#comment-593</guid>
		<description>&lt;p&gt;Let us consider concrete example. Let op(a,b) = a + b, Domain(op) = char. Let a = -127, b = 127, c = 127. All a,b and c belong to Domain(op). But op(op(a,b),c) != op(a, op(b,c)) because right side of this equation makes no sense.&lt;/p&gt;

&lt;p&gt;Does it mean that op is not an associative operation?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Let us consider concrete example. Let op(a,b) = a + b, Domain(op) = char. Let a = -127, b = 127, c = 127. All a,b and c belong to Domain(op). But op(op(a,b),c) != op(a, op(b,c)) because right side of this equation makes no sense.</p>

<p>Does it mean that op is not an associative operation?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Ruzon</title>
		<link>http://cpp-next.com/archive/2010/03/eop-ch3-preview/comment-page-1/#comment-592</link>
		<dc:creator>Mark Ruzon</dc:creator>
		<pubDate>Mon, 19 Apr 2010 22:24:51 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=1195#comment-592</guid>
		<description>&lt;p&gt;I think you mean &quot;It can happen that op(a,b) belongs to the definition space of op, but op(b,c) does not&quot;.  If op is associative, then by definition op(a,op(b,c)) = op(op(a,b),c).&lt;/p&gt;

&lt;p&gt;But to me the point is that a definition space is more of a practical concept necessary in computer science because int != Integer, whereas associativity is a mathematical property on a operation on abstract entities.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I think you mean &#8220;It can happen that op(a,b) belongs to the definition space of op, but op(b,c) does not&#8221;.  If op is associative, then by definition op(a,op(b,c)) = op(op(a,b),c).</p>

<p>But to me the point is that a definition space is more of a practical concept necessary in computer science because int != Integer, whereas associativity is a mathematical property on a operation on abstract entities.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Piotr Jachowicz</title>
		<link>http://cpp-next.com/archive/2010/03/eop-ch3-preview/comment-page-1/#comment-591</link>
		<dc:creator>Piotr Jachowicz</dc:creator>
		<pubDate>Sun, 18 Apr 2010 20:10:43 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=1195#comment-591</guid>
		<description>&lt;p&gt;Ok, so if all a,b,c belong to Domain(op), then op(a, op(b,c)) and op(op(a,b), c) makes sense in terms that argument types matches Domain(op).&lt;/p&gt;

&lt;p&gt;What about definition space? It can happen that (a, op(b,c)) belongs to definitions space of op, but (op(a,b), c) does not.&lt;/p&gt;

&lt;p&gt;I don&#039;t understand why partially_associative definition cares about definition space, but associative do not? Is there a guarantee that op in associative is total?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Ok, so if all a,b,c belong to Domain(op), then op(a, op(b,c)) and op(op(a,b), c) makes sense in terms that argument types matches Domain(op).</p>

<p>What about definition space? It can happen that (a, op(b,c)) belongs to definitions space of op, but (op(a,b), c) does not.</p>

<p>I don&#8217;t understand why partially_associative definition cares about definition space, but associative do not? Is there a guarantee that op in associative is total?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

