<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: The next &#8220;secret weapon&#8221; in programming</title>
	<atom:link href="http://michaelochurch.wordpress.com/2010/10/29/the-next-secret-weapon-in-programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://michaelochurch.wordpress.com/2010/10/29/the-next-secret-weapon-in-programming/</link>
	<description>Rants, essays, and diatribes.</description>
	<lastBuildDate>Mon, 20 May 2013 12:07:01 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: michaelochurch</title>
		<link>http://michaelochurch.wordpress.com/2010/10/29/the-next-secret-weapon-in-programming/#comment-3235</link>
		<dc:creator><![CDATA[michaelochurch]]></dc:creator>
		<pubDate>Sun, 24 Mar 2013 20:03:45 +0000</pubDate>
		<guid isPermaLink="false">http://michaelochurch.wordpress.com/?p=121#comment-3235</guid>
		<description><![CDATA[Static typing is very strong and I still prefer it, but I&#039;m less ideological about it than I used to be. 

What matters more than the language is the kind of work you&#039;re doing day-to-day, which depends on libraries, internal code, and the problem space. You can do things properly in dynamic languages. It just takes a little bit more discipline. ]]></description>
		<content:encoded><![CDATA[<p>Static typing is very strong and I still prefer it, but I&#8217;m less ideological about it than I used to be. </p>
<p>What matters more than the language is the kind of work you&#8217;re doing day-to-day, which depends on libraries, internal code, and the problem space. You can do things properly in dynamic languages. It just takes a little bit more discipline. </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Campbell</title>
		<link>http://michaelochurch.wordpress.com/2010/10/29/the-next-secret-weapon-in-programming/#comment-3233</link>
		<dc:creator><![CDATA[Matt Campbell]]></dc:creator>
		<pubDate>Sun, 24 Mar 2013 19:34:17 +0000</pubDate>
		<guid isPermaLink="false">http://michaelochurch.wordpress.com/?p=121#comment-3233</guid>
		<description><![CDATA[Michael, do you still feel this way about static typing? I&#039;m curious, because on your list of 5 recommended programming languages to learn, 2 have advanced static type systems but 2 are dynamically typed (C is somewhere in between).]]></description>
		<content:encoded><![CDATA[<p>Michael, do you still feel this way about static typing? I&#8217;m curious, because on your list of 5 recommended programming languages to learn, 2 have advanced static type systems but 2 are dynamically typed (C is somewhere in between).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Scott</title>
		<link>http://michaelochurch.wordpress.com/2010/10/29/the-next-secret-weapon-in-programming/#comment-160</link>
		<dc:creator><![CDATA[Brian Scott]]></dc:creator>
		<pubDate>Sun, 29 May 2011 00:01:55 +0000</pubDate>
		<guid isPermaLink="false">http://michaelochurch.wordpress.com/?p=121#comment-160</guid>
		<description><![CDATA[You are incorrect with regards to &quot;Lisps&quot; returning only nil on a map miss.

Common Lisp&#039;s GETHASH returns two values, with the second value being T if the value was found.]]></description>
		<content:encoded><![CDATA[<p>You are incorrect with regards to &#8220;Lisps&#8221; returning only nil on a map miss.</p>
<p>Common Lisp&#8217;s GETHASH returns two values, with the second value being T if the value was found.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Victor Nicollet</title>
		<link>http://michaelochurch.wordpress.com/2010/10/29/the-next-secret-weapon-in-programming/#comment-65</link>
		<dc:creator><![CDATA[Victor Nicollet]]></dc:creator>
		<pubDate>Mon, 21 Feb 2011 09:34:24 +0000</pubDate>
		<guid isPermaLink="false">http://michaelochurch.wordpress.com/?p=121#comment-65</guid>
		<description><![CDATA[&gt; Since type inference is automatic in languages like Ocaml and Haskell, it provides, essentially for free, a large suite of unit tests that never have to be written, and automatic, error-free documentation.

You nailed it. The type system acts as a language-generated basic unit testing suite, with the added benefit of being faster (it is done by the compiler rather than a testing farm and supports incremental testing which further reduces the time between creating and detecting the bug).

And it&#039;s fairly easy to teach yourself how to leverage type annotations for further testing, by adding type constraints that match domain constraints (&quot;an overdrawn account cannot be charged&quot;) that are not immediately obvious from the code itself. I&#039;d say 25% of an average unit test suite can be replaced by type inference, and an additional 50% can be replaced by appropriate design of types and surgical annotation strikes.]]></description>
		<content:encoded><![CDATA[<p>&gt; Since type inference is automatic in languages like Ocaml and Haskell, it provides, essentially for free, a large suite of unit tests that never have to be written, and automatic, error-free documentation.</p>
<p>You nailed it. The type system acts as a language-generated basic unit testing suite, with the added benefit of being faster (it is done by the compiler rather than a testing farm and supports incremental testing which further reduces the time between creating and detecting the bug).</p>
<p>And it&#8217;s fairly easy to teach yourself how to leverage type annotations for further testing, by adding type constraints that match domain constraints (&#8220;an overdrawn account cannot be charged&#8221;) that are not immediately obvious from the code itself. I&#8217;d say 25% of an average unit test suite can be replaced by type inference, and an additional 50% can be replaced by appropriate design of types and surgical annotation strikes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pjungwir</title>
		<link>http://michaelochurch.wordpress.com/2010/10/29/the-next-secret-weapon-in-programming/#comment-55</link>
		<dc:creator><![CDATA[pjungwir]]></dc:creator>
		<pubDate>Sun, 06 Feb 2011 18:15:02 +0000</pubDate>
		<guid isPermaLink="false">http://michaelochurch.wordpress.com/?p=121#comment-55</guid>
		<description><![CDATA[I don&#039;t know OCaml or Haskell, but do you think Scala&#039;s type system is comparable?]]></description>
		<content:encoded><![CDATA[<p>I don&#8217;t know OCaml or Haskell, but do you think Scala&#8217;s type system is comparable?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Cowan</title>
		<link>http://michaelochurch.wordpress.com/2010/10/29/the-next-secret-weapon-in-programming/#comment-53</link>
		<dc:creator><![CDATA[John Cowan]]></dc:creator>
		<pubDate>Fri, 04 Feb 2011 00:49:23 +0000</pubDate>
		<guid isPermaLink="false">http://michaelochurch.wordpress.com/?p=121#comment-53</guid>
		<description><![CDATA[I&#039;ve just read the discussion of success typing at the &lt;a href=&quot;http://www.it.uu.se/research/group/hipe/dialyzer&quot; rel=&quot;nofollow&quot;&gt;Erlang Dialyzer&lt;/a&gt; page.  Success types look like a very nice layer over dynamically typed languages such as Erlang: they report a type error at compile time only if the run-time &lt;i&gt;must&lt;/i&gt; (as opposed to might) report a type error.  For example, given this ruleset (not in Erlang syntax):

foo true true = true;
foo false _ = false;
foo _ false = false;

H-M typing will assign a type of bool -&gt; bool -&gt; bool.  But this is only a small subset of what foo can actually accept: for example, (foo 32 false) is false and so is (foo false &quot;yack&quot;), whereas (foo 32 &quot;yack&quot;) is an error.  So the typing is pessimistic; it prevents errors at run time at the expense of being overly restrictive.

Success typing gives this function the type any -&gt; any -&gt; bool, which is optimistic and reflects the way dynamically typed languages actually work.  Dialyzer has found lots of errors of this type in large, well-aged code bases: it has the advantages that it can be run offline rather than intertwingled with the compiler, and it never generates a false positive.  What&#039;s more, you can add Javadoc-style comments specifying the intended type of a function (Dialyzer already knows about Erlang&#039;s built-in functions), and if any uses are inconsistent with these, Dialyzer will tell you so.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ve just read the discussion of success typing at the <a href="http://www.it.uu.se/research/group/hipe/dialyzer" rel="nofollow">Erlang Dialyzer</a> page.  Success types look like a very nice layer over dynamically typed languages such as Erlang: they report a type error at compile time only if the run-time <i>must</i> (as opposed to might) report a type error.  For example, given this ruleset (not in Erlang syntax):</p>
<p>foo true true = true;<br />
foo false _ = false;<br />
foo _ false = false;</p>
<p>H-M typing will assign a type of bool -&gt; bool -&gt; bool.  But this is only a small subset of what foo can actually accept: for example, (foo 32 false) is false and so is (foo false &#8220;yack&#8221;), whereas (foo 32 &#8220;yack&#8221;) is an error.  So the typing is pessimistic; it prevents errors at run time at the expense of being overly restrictive.</p>
<p>Success typing gives this function the type any -&gt; any -&gt; bool, which is optimistic and reflects the way dynamically typed languages actually work.  Dialyzer has found lots of errors of this type in large, well-aged code bases: it has the advantages that it can be run offline rather than intertwingled with the compiler, and it never generates a false positive.  What&#8217;s more, you can add Javadoc-style comments specifying the intended type of a function (Dialyzer already knows about Erlang&#8217;s built-in functions), and if any uses are inconsistent with these, Dialyzer will tell you so.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Hodder</title>
		<link>http://michaelochurch.wordpress.com/2010/10/29/the-next-secret-weapon-in-programming/#comment-41</link>
		<dc:creator><![CDATA[Dave Hodder]]></dc:creator>
		<pubDate>Sat, 29 Jan 2011 20:06:06 +0000</pubDate>
		<guid isPermaLink="false">http://michaelochurch.wordpress.com/?p=121#comment-41</guid>
		<description><![CDATA[Have you looked at the Rust language at all?  It&#039;s very much a work in progress, and not yet stable in terms of syntax; but it can be used in a Lispy/functional style, and supports both dynamic typing, static typing (with type inference), ADTs, and ML-style pattern matching.]]></description>
		<content:encoded><![CDATA[<p>Have you looked at the Rust language at all?  It&#8217;s very much a work in progress, and not yet stable in terms of syntax; but it can be used in a Lispy/functional style, and supports both dynamic typing, static typing (with type inference), ADTs, and ML-style pattern matching.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://michaelochurch.wordpress.com/2010/10/29/the-next-secret-weapon-in-programming/#comment-36</link>
		<dc:creator><![CDATA[Matt]]></dc:creator>
		<pubDate>Wed, 26 Jan 2011 00:50:37 +0000</pubDate>
		<guid isPermaLink="false">http://michaelochurch.wordpress.com/?p=121#comment-36</guid>
		<description><![CDATA[A static type system for Wordpress tagging would have prevented you from tagging this &quot;progrmaming&quot; :P]]></description>
		<content:encoded><![CDATA[<p>A static type system for WordPress tagging would have prevented you from tagging this &#8220;progrmaming&#8221; <img src='http://s2.wp.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Cowan</title>
		<link>http://michaelochurch.wordpress.com/2010/10/29/the-next-secret-weapon-in-programming/#comment-31</link>
		<dc:creator><![CDATA[John Cowan]]></dc:creator>
		<pubDate>Tue, 25 Jan 2011 16:35:27 +0000</pubDate>
		<guid isPermaLink="false">http://michaelochurch.wordpress.com/?p=121#comment-31</guid>
		<description><![CDATA[Not offhand, alas.  It&#039;s been a while since my informal Haskell class (and I gave up on Haskell).  I will point you to Typed Racket, however, which is statically typed Scheme with far fewer of the inconveniences of H-M type languages, and far more expressiveness in the type system (without being outright Turing-complete).]]></description>
		<content:encoded><![CDATA[<p>Not offhand, alas.  It&#8217;s been a while since my informal Haskell class (and I gave up on Haskell).  I will point you to Typed Racket, however, which is statically typed Scheme with far fewer of the inconveniences of H-M type languages, and far more expressiveness in the type system (without being outright Turing-complete).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: michaelochurch</title>
		<link>http://michaelochurch.wordpress.com/2010/10/29/the-next-secret-weapon-in-programming/#comment-26</link>
		<dc:creator><![CDATA[michaelochurch]]></dc:creator>
		<pubDate>Tue, 25 Jan 2011 16:06:09 +0000</pubDate>
		<guid isPermaLink="false">http://michaelochurch.wordpress.com/?p=121#comment-26</guid>
		<description><![CDATA[Interesting. I haven&#039;t seen this before. Could you show me how to generate it?

Existing type systems have a lot of annoyances and problems: no question about that. And then there is the functor/type-class debate: tye classes are a lot nicer for simple cases, while functors are more general and powerful (to get full functor power out of Haskell, you need the type system extensions). 

I have seen errors where, for example, one might have two identical (under the hood) types, such as &quot;float&quot; and &quot;length&quot;, and get a compilation error because of the type mismatch, but that&#039;s generally held to be a desired behavior. I don&#039;t think it&#039;s what you&#039;re talking about.]]></description>
		<content:encoded><![CDATA[<p>Interesting. I haven&#8217;t seen this before. Could you show me how to generate it?</p>
<p>Existing type systems have a lot of annoyances and problems: no question about that. And then there is the functor/type-class debate: tye classes are a lot nicer for simple cases, while functors are more general and powerful (to get full functor power out of Haskell, you need the type system extensions). </p>
<p>I have seen errors where, for example, one might have two identical (under the hood) types, such as &#8220;float&#8221; and &#8220;length&#8221;, and get a compilation error because of the type mismatch, but that&#8217;s generally held to be a desired behavior. I don&#8217;t think it&#8217;s what you&#8217;re talking about.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
