<?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"
	>
<channel>
	<title>Comments on: Contract Programming in D</title>
	<atom:link href="http://www.hans-eric.com/2007/08/27/contract-programming-in-d/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hans-eric.com/2007/08/27/contract-programming-in-d/</link>
	<description>Hans-Eric Grönlund on software development</description>
	<pubDate>Thu, 24 Jul 2008 10:24:06 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: The Future of D is Functional</title>
		<link>http://www.hans-eric.com/2007/08/27/contract-programming-in-d/#comment-5580</link>
		<dc:creator>The Future of D is Functional</dc:creator>
		<pubDate>Wed, 16 Apr 2008 10:33:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.hans-eric.com/2007/08/27/contract-programming-in-d/#comment-5580</guid>
		<description>[...] people think D suffers from such a feature creep. To some degree I can agree. D has features that are unlikely to become widespread, but most of them are aligned towards a common goal. That goal is bringing productivity to the [...]</description>
		<content:encoded><![CDATA[<p>[...] people think D suffers from such a feature creep. To some degree I can agree. D has features that are unlikely to become widespread, but most of them are aligned towards a common goal. That goal is bringing productivity to the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: www.hans-eric.com &#187; Blog Archive &#187; Is the Contract Programming of D broken?</title>
		<link>http://www.hans-eric.com/2007/08/27/contract-programming-in-d/#comment-13</link>
		<dc:creator>www.hans-eric.com &#187; Blog Archive &#187; Is the Contract Programming of D broken?</dc:creator>
		<pubDate>Wed, 29 Aug 2007 10:57:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.hans-eric.com/2007/08/27/contract-programming-in-d/#comment-13</guid>
		<description>[...] www.hans-eric.com       &#171; Contract Programming in D [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.hans-eric.com" rel="nofollow">http://www.hans-eric.com</a>       &laquo; Contract Programming in D [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hans-Eric</title>
		<link>http://www.hans-eric.com/2007/08/27/contract-programming-in-d/#comment-12</link>
		<dc:creator>Hans-Eric</dc:creator>
		<pubDate>Wed, 29 Aug 2007 09:15:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.hans-eric.com/2007/08/27/contract-programming-in-d/#comment-12</guid>
		<description>wekempf: I meant the entire clause, not the individual conditions. I wasn't clear in my post and I'm glad you clarified it.

Stay tuned, I'm currently investigating the behavior of D:s contracts in an override scenario. I hope to post the results and the code later today.</description>
		<content:encoded><![CDATA[<p>wekempf: I meant the entire clause, not the individual conditions. I wasn&#8217;t clear in my post and I&#8217;m glad you clarified it.</p>
<p>Stay tuned, I&#8217;m currently investigating the behavior of D:s contracts in an override scenario. I hope to post the results and the code later today.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wekempf</title>
		<link>http://www.hans-eric.com/2007/08/27/contract-programming-in-d/#comment-11</link>
		<dc:creator>wekempf</dc:creator>
		<pubDate>Tue, 28 Aug 2007 13:48:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.hans-eric.com/2007/08/27/contract-programming-in-d/#comment-11</guid>
		<description>Preconditions may be loosened, while postconditions may be tightened.  The individual conditions aren't ORed, it's the entire in clause that's ORed between super and sub classes for a particular method.  I've not used D, but this is the same concept used by other languages that support DbC.  It would be interesting to see code that you think exhibits different behavior.

DbC doesn't fully replace defensive coding.  There's a reason why you still have the assert().  You should really be using both, since assert() can't do everything that DbC can do, and vice versa.  However, if all of your code is properly contracted, you'll find fewer instances where you need an assert().</description>
		<content:encoded><![CDATA[<p>Preconditions may be loosened, while postconditions may be tightened.  The individual conditions aren&#8217;t ORed, it&#8217;s the entire in clause that&#8217;s ORed between super and sub classes for a particular method.  I&#8217;ve not used D, but this is the same concept used by other languages that support DbC.  It would be interesting to see code that you think exhibits different behavior.</p>
<p>DbC doesn&#8217;t fully replace defensive coding.  There&#8217;s a reason why you still have the assert().  You should really be using both, since assert() can&#8217;t do everything that DbC can do, and vice versa.  However, if all of your code is properly contracted, you&#8217;ll find fewer instances where you need an assert().</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hans-Eric</title>
		<link>http://www.hans-eric.com/2007/08/27/contract-programming-in-d/#comment-10</link>
		<dc:creator>Hans-Eric</dc:creator>
		<pubDate>Tue, 28 Aug 2007 07:55:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.hans-eric.com/2007/08/27/contract-programming-in-d/#comment-10</guid>
		<description>You definitely have a point there. 
In my experience, the need of documentation varies depending on situation. If a defensive code is solely internal, testing class internal, non-published implementation specific code, then there is little need for documentation and specific tests. On the other hand, if it is protecting from external misuse, then you need to document and test your assumptions.  In those cases I tend to make as little assumptions as possible.
Contract Programming tends to be self documenting, and tools can be made to help extracting information from them. That is an advantage DbC has over the informal defensive coding.</description>
		<content:encoded><![CDATA[<p>You definitely have a point there.<br />
In my experience, the need of documentation varies depending on situation. If a defensive code is solely internal, testing class internal, non-published implementation specific code, then there is little need for documentation and specific tests. On the other hand, if it is protecting from external misuse, then you need to document and test your assumptions.  In those cases I tend to make as little assumptions as possible.<br />
Contract Programming tends to be self documenting, and tools can be made to help extracting information from them. That is an advantage DbC has over the informal defensive coding.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Kaufman</title>
		<link>http://www.hans-eric.com/2007/08/27/contract-programming-in-d/#comment-9</link>
		<dc:creator>Mike Kaufman</dc:creator>
		<pubDate>Mon, 27 Aug 2007 21:10:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.hans-eric.com/2007/08/27/contract-programming-in-d/#comment-9</guid>
		<description>I think another potential issue is how to document the rules/contracts, and how to check they are present and as intended.

I'm currently working in Java, and code defensively - and the checks end up being documented in the Javadoc, in natural language. And they need tests to prove they behave as intended and documented (though I guess many wouldn't bother).

With "contract" programming, because the conditions are more formally identified and defined, I'd expect that a lot of that should disappear or be handled automatically (or at least benefit from being clearly separate and more codified).</description>
		<content:encoded><![CDATA[<p>I think another potential issue is how to document the rules/contracts, and how to check they are present and as intended.</p>
<p>I&#8217;m currently working in Java, and code defensively - and the checks end up being documented in the Javadoc, in natural language. And they need tests to prove they behave as intended and documented (though I guess many wouldn&#8217;t bother).</p>
<p>With &#8220;contract&#8221; programming, because the conditions are more formally identified and defined, I&#8217;d expect that a lot of that should disappear or be handled automatically (or at least benefit from being clearly separate and more codified).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.256 seconds -->
