<?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;1: Foundations</title>
	<atom:link href="http://cpp-next.com/archive/2009/11/%e2%80%9celements-of-programming%e2%80%9d-chapter-1-foundations/feed/" rel="self" type="application/rss+xml" />
	<link>http://cpp-next.com/archive/2009/11/%e2%80%9celements-of-programming%e2%80%9d-chapter-1-foundations/</link>
	<description>The next generation of C++</description>
	<lastBuildDate>Fri, 27 Jan 2012 17:36:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Petar Marendic</title>
		<link>http://cpp-next.com/archive/2009/11/%e2%80%9celements-of-programming%e2%80%9d-chapter-1-foundations/comment-page-1/#comment-448</link>
		<dc:creator>Petar Marendic</dc:creator>
		<pubDate>Tue, 05 Oct 2010 12:43:20 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=901#comment-448</guid>
		<description>&lt;p&gt;After making a long break from the book I skimmed through the first chapter to quickly brush up on the terminology and this sentence struck me as dubious:&lt;/p&gt;

&lt;p&gt;page 14, line 12&lt;/p&gt;

&lt;p&gt;&quot;To define regularity of a unary functional procedure, we write...&quot; - and yet on page 9 it is stated: &quot;A functional procedure is a regular procedure defined on regular types...&quot;&lt;/p&gt;

&lt;p&gt;Seems redundant, or not?&lt;/p&gt;

&lt;p&gt;Additionally, the precondition immediately following this sentence introduces the notion of function equality in its definition of procedure regularity (&quot;Application of equal functions to equal arguments gives equal results&quot;), something that was not mentioned on page 8, where regular procedures are defined as: &quot;A procedure is regular if and only if replacing its inputs with equal objects results in equal output objects.&quot;&lt;/p&gt;

&lt;p&gt;In my opinion, equality of functions deserves to be defined beforehand, as it&#039;s not a trivial idea. As far as I can see, it hasn&#039;t been explicitly introduced anywhere in the preceding portion of the text.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>After making a long break from the book I skimmed through the first chapter to quickly brush up on the terminology and this sentence struck me as dubious:</p>

<p>page 14, line 12</p>

<p>&#8220;To define regularity of a unary functional procedure, we write&#8230;&#8221; &#8211; and yet on page 9 it is stated: &#8220;A functional procedure is a regular procedure defined on regular types&#8230;&#8221;</p>

<p>Seems redundant, or not?</p>

<p>Additionally, the precondition immediately following this sentence introduces the notion of function equality in its definition of procedure regularity (&#8220;Application of equal functions to equal arguments gives equal results&#8221;), something that was not mentioned on page 8, where regular procedures are defined as: &#8220;A procedure is regular if and only if replacing its inputs with equal objects results in equal output objects.&#8221;</p>

<p>In my opinion, equality of functions deserves to be defined beforehand, as it&#8217;s not a trivial idea. As far as I can see, it hasn&#8217;t been explicitly introduced anywhere in the preceding portion of the text.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Parent</title>
		<link>http://cpp-next.com/archive/2009/11/%e2%80%9celements-of-programming%e2%80%9d-chapter-1-foundations/comment-page-1/#comment-447</link>
		<dc:creator>Sean Parent</dc:creator>
		<pubDate>Sat, 11 Sep 2010 23:31:36 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=901#comment-447</guid>
		<description>&lt;p&gt;Yes. Various languages will ignore one or more properties of objects but the objects still exist as they are a &quot;side effect&quot; of providing a physical representation for a value. Functional languages deal with values and ignore address and mutability of parts (single assignment). Reference semantic languages (Java as an example) put a lower emphasis on copy (assignment assigns references, not objects). With FP languages the choice is to use a computational basis which simplifies reasoning but isn&#039;t necessarily an efficient basis. The move with reference semantic languages come largely from dealing with variable sized, polymorphic, types. EoP seeks to provide a framework to reason about programming on current machine architectures, providing mathematical rigor without compromising efficiency. It can be viewed as an extension of FP, providing a framework to reason about object instead of simply ignoring them since under the hood they do exist in any FP system. Some of the ideas in EoP, such as an underlying type, are not particularly practical to implement in C++, yet the notion of an underlying type exists regardless of what language one is using.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Yes. Various languages will ignore one or more properties of objects but the objects still exist as they are a &#8220;side effect&#8221; of providing a physical representation for a value. Functional languages deal with values and ignore address and mutability of parts (single assignment). Reference semantic languages (Java as an example) put a lower emphasis on copy (assignment assigns references, not objects). With FP languages the choice is to use a computational basis which simplifies reasoning but isn&#8217;t necessarily an efficient basis. The move with reference semantic languages come largely from dealing with variable sized, polymorphic, types. EoP seeks to provide a framework to reason about programming on current machine architectures, providing mathematical rigor without compromising efficiency. It can be viewed as an extension of FP, providing a framework to reason about object instead of simply ignoring them since under the hood they do exist in any FP system. Some of the ideas in EoP, such as an underlying type, are not particularly practical to implement in C++, yet the notion of an underlying type exists regardless of what language one is using.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Marcin Zalewski</title>
		<link>http://cpp-next.com/archive/2009/11/%e2%80%9celements-of-programming%e2%80%9d-chapter-1-foundations/comment-page-1/#comment-446</link>
		<dc:creator>Marcin Zalewski</dc:creator>
		<pubDate>Thu, 09 Sep 2010 20:23:28 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=901#comment-446</guid>
		<description>&lt;p&gt;Could it be that some languages choose to represent values instead of objects? For example, in most functional languages, including Haskell, one mostly works with values, and objects are usually considered hacks. For example:&lt;/p&gt;

&lt;p&gt;data List a = Nil &#124; Cons a (List a)&lt;/p&gt;

&lt;p&gt;myList = Cons 1 (Cons 2 Nil)&lt;/p&gt;

&lt;p&gt;myList does not have any of the properties of objects, including an address. It is a value representing a well-defined (abstract?) entity.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Could it be that some languages choose to represent values instead of objects? For example, in most functional languages, including Haskell, one mostly works with values, and objects are usually considered hacks. For example:</p>

<p>data List a = Nil | Cons a (List a)</p>

<p>myList = Cons 1 (Cons 2 Nil)</p>

<p>myList does not have any of the properties of objects, including an address. It is a value representing a well-defined (abstract?) entity.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Ahmed Charles</title>
		<link>http://cpp-next.com/archive/2009/11/%e2%80%9celements-of-programming%e2%80%9d-chapter-1-foundations/comment-page-1/#comment-445</link>
		<dc:creator>Ahmed Charles</dc:creator>
		<pubDate>Fri, 26 Feb 2010 18:19:03 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=901#comment-445</guid>
		<description>&lt;p&gt;I noticed that Domain as defined at the bottom of page 12 is used to determine both the domain and codomain of the square procedure on page 13. That seems a bit less than precise.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I noticed that Domain as defined at the bottom of page 12 is used to determine both the domain and codomain of the square procedure on page 13. That seems a bit less than precise.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Abrahams</title>
		<link>http://cpp-next.com/archive/2009/11/%e2%80%9celements-of-programming%e2%80%9d-chapter-1-foundations/comment-page-1/#comment-444</link>
		<dc:creator>Dave Abrahams</dc:creator>
		<pubDate>Wed, 27 Jan 2010 17:37:18 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=901#comment-444</guid>
		<description>&lt;blockquote cite=&quot;comment-395&quot;&gt;

&lt;strong&gt;&lt;a href=&quot;#comment-395&quot; rel=&quot;nofollow&quot;&gt;Sean Parent&lt;/a&gt;&lt;/strong&gt;: Relationships are external to the type – regardless of how important that relationship is. Consider an array, “a”, with 3 elements. a[1] is after a[0] and before a[2]. Those are very important properties of a[1]. But copying a[1] severs those relationships.
&lt;/blockquote&gt;

&lt;p&gt;Yeah, but so does moving.  That makes memory order a very different kind of relationship.&lt;/p&gt;

&lt;blockquote cite=&quot;comment-395&quot;&gt;
Let’s not go too far down this path though since it is outside the scope of EoP – and on this topic I can’t speak for Alex and Paul except that I suspect they would agree with me that there is enough material in dealing with relationship properties to write another book.
&lt;/blockquote&gt;

&lt;p&gt;I&#039;m willing to &quot;not go too far&quot; down this path, but just for the record, I don&#039;t buy what you&#039;re selling here.  I believe these types &lt;em&gt;do&lt;/em&gt; undercut the statement about all types being intrinsically (or logically) Regular, principally because they break the relationship between move and copy that makes Regular meaningful.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<blockquote cite="comment-395">

<strong><a href="#comment-395" rel="nofollow">Sean Parent</a></strong>: Relationships are external to the type – regardless of how important that relationship is. Consider an array, “a”, with 3 elements. a[1] is after a[0] and before a[2]. Those are very important properties of a[1]. But copying a[1] severs those relationships.
</blockquote>

<p>Yeah, but so does moving.  That makes memory order a very different kind of relationship.</p>

<blockquote cite="comment-395">
Let’s not go too far down this path though since it is outside the scope of EoP – and on this topic I can’t speak for Alex and Paul except that I suspect they would agree with me that there is enough material in dealing with relationship properties to write another book.
</blockquote>

<p>I&#8217;m willing to &#8220;not go too far&#8221; down this path, but just for the record, I don&#8217;t buy what you&#8217;re selling here.  I believe these types <em>do</em> undercut the statement about all types being intrinsically (or logically) Regular, principally because they break the relationship between move and copy that makes Regular meaningful.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Abrahams</title>
		<link>http://cpp-next.com/archive/2009/11/%e2%80%9celements-of-programming%e2%80%9d-chapter-1-foundations/comment-page-1/#comment-443</link>
		<dc:creator>Dave Abrahams</dc:creator>
		<pubDate>Wed, 27 Jan 2010 17:32:36 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=901#comment-443</guid>
		<description>&lt;p&gt;I would have an easier time with this if it didn&#039;t circle back to a statement that &quot;the type is still intrinsically regular.&quot;   Still, if I put that together with its context (&quot;we can still use equational reasoning&quot;), I may be able to understand.  What I think you&#039;re saying is that, even if we can&#039;t implement equality, there is still a fundamental platonic notion of equality that applies and allows us to reason about programs.&lt;/p&gt;

&lt;p&gt;Fine, as far as it goes.  But &quot;Regular&quot; as defined &lt;em&gt;does&lt;/em&gt; include efficiency guarantees.  When you say &quot;intrinsically regular&quot; it implies to me that Regular is in there somewhere waiting to be realized.  I think you really mean something more like &quot;logically regular,&quot; i.e. the phrase needs a qualifier that implies a weakening of the notion of regularity, and &quot;intrinsic&quot; implies strengthening (or at least, not weakening).&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I would have an easier time with this if it didn&#8217;t circle back to a statement that &#8220;the type is still intrinsically regular.&#8221;   Still, if I put that together with its context (&#8220;we can still use equational reasoning&#8221;), I may be able to understand.  What I think you&#8217;re saying is that, even if we can&#8217;t implement equality, there is still a fundamental platonic notion of equality that applies and allows us to reason about programs.</p>

<p>Fine, as far as it goes.  But &#8220;Regular&#8221; as defined <em>does</em> include efficiency guarantees.  When you say &#8220;intrinsically regular&#8221; it implies to me that Regular is in there somewhere waiting to be realized.  I think you really mean something more like &#8220;logically regular,&#8221; i.e. the phrase needs a qualifier that implies a weakening of the notion of regularity, and &#8220;intrinsic&#8221; implies strengthening (or at least, not weakening).</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Ruzon</title>
		<link>http://cpp-next.com/archive/2009/11/%e2%80%9celements-of-programming%e2%80%9d-chapter-1-foundations/comment-page-1/#comment-442</link>
		<dc:creator>Mark Ruzon</dc:creator>
		<pubDate>Tue, 12 Jan 2010 00:19:34 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=901#comment-442</guid>
		<description>&lt;p&gt;I think it&#039;s no more complicated than saying (e.g.) that &#039;int&#039; refers to a fixed-size integer type and not Z, the set of all integers.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I think it&#8217;s no more complicated than saying (e.g.) that &#8216;int&#8217; refers to a fixed-size integer type and not Z, the set of all integers.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Andrzej Krzemienski</title>
		<link>http://cpp-next.com/archive/2009/11/%e2%80%9celements-of-programming%e2%80%9d-chapter-1-foundations/comment-page-1/#comment-441</link>
		<dc:creator>Andrzej Krzemienski</dc:creator>
		<pubDate>Sun, 10 Jan 2010 11:45:10 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=901#comment-441</guid>
		<description>&lt;p&gt;Hi, in section 1.3 (Objects) we read &quot;This book uses a programming language that has no way to describe values and value types as separate from objects and object types.&quot; I am having trouble imagining how would such a separation look like, and how/if it would be helpful. Could anyone give me a hint?&lt;/p&gt;

&lt;p&gt;Regards,
&amp;rzej&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi, in section 1.3 (Objects) we read &#8220;This book uses a programming language that has no way to describe values and value types as separate from objects and object types.&#8221; I am having trouble imagining how would such a separation look like, and how/if it would be helpful. Could anyone give me a hint?</p>

<p>Regards,
&amp;rzej</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Parent</title>
		<link>http://cpp-next.com/archive/2009/11/%e2%80%9celements-of-programming%e2%80%9d-chapter-1-foundations/comment-page-1/#comment-440</link>
		<dc:creator>Sean Parent</dc:creator>
		<pubDate>Wed, 30 Dec 2009 23:55:26 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=901#comment-440</guid>
		<description>&lt;p&gt;It&#039;s about time to get moving on to Chapter 2. Please e-mail your homework for Chapter 1 to eop-study@cpp-next.com and Dave and I will summarize.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>It&#8217;s about time to get moving on to Chapter 2. Please e-mail your homework for Chapter 1 to <a href="mailto:eop-study@cpp-next.com">eop-study@cpp-next.com</a> and Dave and I will summarize.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Parent</title>
		<link>http://cpp-next.com/archive/2009/11/%e2%80%9celements-of-programming%e2%80%9d-chapter-1-foundations/comment-page-1/#comment-439</link>
		<dc:creator>Sean Parent</dc:creator>
		<pubDate>Wed, 30 Dec 2009 23:51:40 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=901#comment-439</guid>
		<description>&lt;p&gt;It wasn&#039;t intended to be a Zen meditation. Let&#039;s use one of the above examples - graph isomorphism. We can define that two graphs are equal iff they are isomorphic. Now, we can claim that if we copy a graph, the new graph is equal to the original. We know that representational equality implies true equality so we could use representational equality to verify our copy. We can&#039;t implement a general, useful, equality (one that terminates for graphs beyond some size) so our implementation is necessarily incomplete. But the type is still intrinsically regular and we can still use equational reasoning to reason about our code, although there may be many operations for which we can&#039;t verify the results - even though we can prove them correct.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>It wasn&#8217;t intended to be a Zen meditation. Let&#8217;s use one of the above examples &#8211; graph isomorphism. We can define that two graphs are equal iff they are isomorphic. Now, we can claim that if we copy a graph, the new graph is equal to the original. We know that representational equality implies true equality so we could use representational equality to verify our copy. We can&#8217;t implement a general, useful, equality (one that terminates for graphs beyond some size) so our implementation is necessarily incomplete. But the type is still intrinsically regular and we can still use equational reasoning to reason about our code, although there may be many operations for which we can&#8217;t verify the results &#8211; even though we can prove them correct.</p>]]></content:encoded>
	</item>
</channel>
</rss>

