<?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: A small example of the hidden dangers of dynamically typed programming languages.</title>
	<atom:link href="http://pinderkent.blogsavy.com/archives/144/feed" rel="self" type="application/rss+xml" />
	<link>http://pinderkent.blogsavy.com/archives/144</link>
	<description>Just another Blogsavy.com weblog</description>
	<pubDate>Thu, 28 Aug 2008 02:50:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Jon Harrop</title>
		<link>http://pinderkent.blogsavy.com/archives/144#comment-318</link>
		<dc:creator>Jon Harrop</dc:creator>
		<pubDate>Thu, 21 Feb 2008 11:02:21 +0000</pubDate>
		<guid isPermaLink="false">http://pinderkent.blogsavy.com/archives/157#comment-318</guid>
		<description>Yes! You are describing the incredibly-important difference between proof and testing. Static type checking proves the correctness of programs within specified limits whereas unit tests try a few values and check for specified errors.

However, I think it is more important to stress that dynamically typed languages require vastly more unit testing to achieve the same level of robustness. Specifically, the amount of code required to perform suitable unit testing in a project written in a dynamically-typed language is 50-200% the size of the code base itself whereas the code required for testing a statically-typed project is only 1-2%. In other words, although some production-quality dynamically typed languages can almost achieve the brevity of the best statically typed languages, they are still vastly more expensive because your programmers must spend at least half as much time again manually making up for the lack of static checking if you want your product to work reliably.

Objectively, note how dynamically typed languages have only obtained significant use in areas of industry where reliability is comparatively unimportant, e.g. web programming.</description>
		<content:encoded><![CDATA[<p>Yes! You are describing the incredibly-important difference between proof and testing. Static type checking proves the correctness of programs within specified limits whereas unit tests try a few values and check for specified errors.</p>
<p>However, I think it is more important to stress that dynamically typed languages require vastly more unit testing to achieve the same level of robustness. Specifically, the amount of code required to perform suitable unit testing in a project written in a dynamically-typed language is 50-200% the size of the code base itself whereas the code required for testing a statically-typed project is only 1-2%. In other words, although some production-quality dynamically typed languages can almost achieve the brevity of the best statically typed languages, they are still vastly more expensive because your programmers must spend at least half as much time again manually making up for the lack of static checking if you want your product to work reliably.</p>
<p>Objectively, note how dynamically typed languages have only obtained significant use in areas of industry where reliability is comparatively unimportant, e.g. web programming.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack</title>
		<link>http://pinderkent.blogsavy.com/archives/144#comment-317</link>
		<dc:creator>Jack</dc:creator>
		<pubDate>Tue, 19 Feb 2008 23:48:42 +0000</pubDate>
		<guid isPermaLink="false">http://pinderkent.blogsavy.com/archives/157#comment-317</guid>
		<description>I think you should also be concerned about cars. It turns out that you can easily drive them off cliffs! Since cars are so clearly dangerous, you should never use them. I hope that you will use your blog to alert others of this hidden danger.</description>
		<content:encoded><![CDATA[<p>I think you should also be concerned about cars. It turns out that you can easily drive them off cliffs! Since cars are so clearly dangerous, you should never use them. I hope that you will use your blog to alert others of this hidden danger.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ray Tayek</title>
		<link>http://pinderkent.blogsavy.com/archives/144#comment-316</link>
		<dc:creator>Ray Tayek</dc:creator>
		<pubDate>Tue, 19 Feb 2008 05:49:31 +0000</pubDate>
		<guid isPermaLink="false">http://pinderkent.blogsavy.com/archives/157#comment-316</guid>
		<description>more food for thought: http://cdsmith.twu.net/types.html</description>
		<content:encoded><![CDATA[<p>more food for thought: <a href="http://cdsmith.twu.net/types.html" rel="nofollow">http://cdsmith.twu.net/types.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James H.</title>
		<link>http://pinderkent.blogsavy.com/archives/144#comment-315</link>
		<dc:creator>James H.</dc:creator>
		<pubDate>Mon, 18 Feb 2008 22:12:47 +0000</pubDate>
		<guid isPermaLink="false">http://pinderkent.blogsavy.com/archives/157#comment-315</guid>
		<description>This is (among the reasons) why I use haXe. It's a language that combines inferred static types with dynamic typing. So I can benefit from dynamic typing's flexibility, but don't have to pull out that poor "unit test everything" excuse, because the cases where I really, really want to use dynamics are relatively slim. Not that unit tests are bad, but they're more work. The compiler can offload some of that work. It saves me time and effort.</description>
		<content:encoded><![CDATA[<p>This is (among the reasons) why I use haXe. It&#8217;s a language that combines inferred static types with dynamic typing. So I can benefit from dynamic typing&#8217;s flexibility, but don&#8217;t have to pull out that poor &#8220;unit test everything&#8221; excuse, because the cases where I really, really want to use dynamics are relatively slim. Not that unit tests are bad, but they&#8217;re more work. The compiler can offload some of that work. It saves me time and effort.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Groovy is clearly not a statically typed language.</title>
		<link>http://pinderkent.blogsavy.com/archives/144#comment-314</link>
		<dc:creator>Groovy is clearly not a statically typed language.</dc:creator>
		<pubDate>Mon, 18 Feb 2008 17:59:15 +0000</pubDate>
		<guid isPermaLink="false">http://pinderkent.blogsavy.com/archives/157#comment-314</guid>
		<description>[...] Pain and Glory from the Trenches of the IT World     &#171; A small example of the hidden dangers of dynamically typed programming languages. [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Pain and Glory from the Trenches of the IT World     &laquo; A small example of the hidden dangers of dynamically typed programming languages. [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leppie</title>
		<link>http://pinderkent.blogsavy.com/archives/144#comment-313</link>
		<dc:creator>leppie</dc:creator>
		<pubDate>Mon, 18 Feb 2008 14:45:50 +0000</pubDate>
		<guid isPermaLink="false">http://pinderkent.blogsavy.com/archives/157#comment-313</guid>
		<description>I dont use either Python or Ruby, but from the output it's quite easy to see ARGV and argv returns different lengths.</description>
		<content:encoded><![CDATA[<p>I dont use either Python or Ruby, but from the output it&#8217;s quite easy to see ARGV and argv returns different lengths.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Murphy</title>
		<link>http://pinderkent.blogsavy.com/archives/144#comment-312</link>
		<dc:creator>Mark Murphy</dc:creator>
		<pubDate>Mon, 18 Feb 2008 11:33:04 +0000</pubDate>
		<guid isPermaLink="false">http://pinderkent.blogsavy.com/archives/157#comment-312</guid>
		<description>Arguably, what you're describing is not a problem with dynamic typing, but a problem of doing unit testing without a code coverage tool that can handle branch and loop coverage. In your example, the issue is that there was no unit test for ARGV.length&#62;3 (to use the Ruby syntax), which a good coverage tool will point out. In other words, given a solid coverage analyzer, unit tests will try even these edge and corner cases...including those where even static typing would have gotten it wrong. After all, I've written enough code in statically-typed languages to know that typing doesn't eliminate all bugs, that unit tests are needed in statically-typed languages, and that code coverage is important there too. In fact, I wrote a book on the subject.

My broader concern is an overall theme of these style of posts -- where one compares Language X to Language Y (or, in your case, Language Feature A vs. Language Feature B). The "vibe", whether implicit or explicit, is "I found an issue with Language X, therefore Language X is the spawn of Satan and those who use or promote Language X should be stoned...and not in a good way, m'kay?". The issue is probably real, the problems the issues causes are probably real, but those problems need to be balanced against the problems with the alternative(s). Most important, how one weighs one set of problems vs. another set of problems is intrinsically personal, based on experience and situation, and so it is disingenuous for somebody to cast blanket aspersions on Language X or Language Feature A. Pointing out the issue is fine, saying that *you* won't use Language X or Language Feature A is fine, but that's as far as you can take it. In this post, you were fine; in your preceding post on this subject, you said "Clearly, static typing is the only sensible, and the most efficient, route to take.", which is stepping outside the bounds of what anybody is qualified to state.</description>
		<content:encoded><![CDATA[<p>Arguably, what you&#8217;re describing is not a problem with dynamic typing, but a problem of doing unit testing without a code coverage tool that can handle branch and loop coverage. In your example, the issue is that there was no unit test for ARGV.length&gt;3 (to use the Ruby syntax), which a good coverage tool will point out. In other words, given a solid coverage analyzer, unit tests will try even these edge and corner cases&#8230;including those where even static typing would have gotten it wrong. After all, I&#8217;ve written enough code in statically-typed languages to know that typing doesn&#8217;t eliminate all bugs, that unit tests are needed in statically-typed languages, and that code coverage is important there too. In fact, I wrote a book on the subject.</p>
<p>My broader concern is an overall theme of these style of posts &#8212; where one compares Language X to Language Y (or, in your case, Language Feature A vs. Language Feature B). The &#8220;vibe&#8221;, whether implicit or explicit, is &#8220;I found an issue with Language X, therefore Language X is the spawn of Satan and those who use or promote Language X should be stoned&#8230;and not in a good way, m&#8217;kay?&#8221;. The issue is probably real, the problems the issues causes are probably real, but those problems need to be balanced against the problems with the alternative(s). Most important, how one weighs one set of problems vs. another set of problems is intrinsically personal, based on experience and situation, and so it is disingenuous for somebody to cast blanket aspersions on Language X or Language Feature A. Pointing out the issue is fine, saying that *you* won&#8217;t use Language X or Language Feature A is fine, but that&#8217;s as far as you can take it. In this post, you were fine; in your preceding post on this subject, you said &#8220;Clearly, static typing is the only sensible, and the most efficient, route to take.&#8221;, which is stepping outside the bounds of what anybody is qualified to state.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://pinderkent.blogsavy.com/archives/144#comment-311</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Mon, 18 Feb 2008 09:21:04 +0000</pubDate>
		<guid isPermaLink="false">http://pinderkent.blogsavy.com/archives/157#comment-311</guid>
		<description>That was a long way of saying, "dynamically typed languages are dynamically typed".  That they don't catch type errors until runtime is a given.

The whole point of unit tests is to make sure there is no rarely-executed code.</description>
		<content:encoded><![CDATA[<p>That was a long way of saying, &#8220;dynamically typed languages are dynamically typed&#8221;.  That they don&#8217;t catch type errors until runtime is a given.</p>
<p>The whole point of unit tests is to make sure there is no rarely-executed code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cale Gibbard</title>
		<link>http://pinderkent.blogsavy.com/archives/144#comment-310</link>
		<dc:creator>Cale Gibbard</dc:creator>
		<pubDate>Mon, 18 Feb 2008 04:42:37 +0000</pubDate>
		<guid isPermaLink="false">http://pinderkent.blogsavy.com/archives/157#comment-310</guid>
		<description>Just thought I'd point out that your blog has munched on the Haskell code a bit.</description>
		<content:encoded><![CDATA[<p>Just thought I&#8217;d point out that your blog has munched on the Haskell code a bit.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
