<?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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	>
<channel>
	<title>Comments on: 7 Actually Useful Things You Didn&#8217;t Know Static Typing Could Do: An Introduction for the Dynamic Language Enthusiast</title>
	<atom:link href="http://enfranchisedmind.com/blog/posts/useful-things-about-static-typing/feed/" rel="self" type="application/rss+xml" />
	<link>http://enfranchisedmind.com/blog/posts/useful-things-about-static-typing/</link>
	<description>programming, politics, &#38; other religious issues</description>
	<lastBuildDate>Mon, 15 Mar 2010 00:31:40 +0000</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Michael B</title>
		<link>http://enfranchisedmind.com/blog/posts/useful-things-about-static-typing/#comment-37312</link>
		<dc:creator>Michael B</dc:creator>
		<pubDate>Sun, 28 Feb 2010 19:49:41 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=610#comment-37312</guid>
		<description>@ Paddy

&lt;cite&gt;
Think of Dynamic languages like riding a bike.
Sure, you only have two wheels,
But what you propose is like keeping the training wheels on full time.
When some experience will show, that after training,
You can ride better without them.
&lt;/cite&gt;

s/Dynamic languages/Languages with pointers/
s/Dynamic languages/malloc()+free() languages/
s/Dynamic languages/Assembly language/

All of these are Real Programmer fallacy arguments.

Real Programmers don&#039;t like it when computers solve problems for them.  Where&#039;s the thrill in that?</description>
		<content:encoded><![CDATA[<p>@ Paddy</p>
<p><cite><br />
Think of Dynamic languages like riding a bike.<br />
Sure, you only have two wheels,<br />
But what you propose is like keeping the training wheels on full time.<br />
When some experience will show, that after training,<br />
You can ride better without them.<br />
</cite></p>
<p>s/Dynamic languages/Languages with pointers/<br />
s/Dynamic languages/malloc()+free() languages/<br />
s/Dynamic languages/Assembly language/</p>
<p>All of these are Real Programmer fallacy arguments.</p>
<p>Real Programmers don&#8217;t like it when computers solve problems for them.  Where&#8217;s the thrill in that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://enfranchisedmind.com/blog/posts/useful-things-about-static-typing/#comment-36817</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Fri, 28 Aug 2009 00:19:39 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=610#comment-36817</guid>
		<description>What I find interesting is the &quot;sufficiently careful coder&quot; idea as an argument against static typing- that a sufficiently careful coder simply wouldn&#039;t make mistakes, and thus doesn&#039;t need any safeguards.   This is quite obviously true, on the other hand I&#039;ve yet to meet the programmer who doesn&#039;t make mistakes.  And he sure as heck doesn&#039;t look at me in the mirror.</description>
		<content:encoded><![CDATA[<p>What I find interesting is the &#8220;sufficiently careful coder&#8221; idea as an argument against static typing- that a sufficiently careful coder simply wouldn&#8217;t make mistakes, and thus doesn&#8217;t need any safeguards.   This is quite obviously true, on the other hand I&#8217;ve yet to meet the programmer who doesn&#8217;t make mistakes.  And he sure as heck doesn&#8217;t look at me in the mirror.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Fischer</title>
		<link>http://enfranchisedmind.com/blog/posts/useful-things-about-static-typing/#comment-36816</link>
		<dc:creator>Robert Fischer</dc:creator>
		<pubDate>Thu, 27 Aug 2009 13:23:01 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=610#comment-36816</guid>
		<description>@anony2

First of all, you seem to be reading this post as a static typing vs. dynamic typing argument.  It&#039;s not.  It&#039;s simply showing some of the features of static typing which aren&#039;t usually part of the conversation around type systems.

Second, you&#039;re basically saying that you are callous to the ways in which dynamic typing brings in accidental complexity to your system.  That&#039;s not a surprise: everyone gets comfortable with their ways of coping with life&#039;s difficulties, and then it&#039;s &quot;no big deal&quot;.

This habit includes Java people, BTW.  I once showed a Java person this bit of Groovy:
&lt;pre lang=&quot;Groovy&quot;&gt;
class Foo {
  int bar
}
&lt;/pre&gt;
That code translates (handwave) into the following Java:
&lt;pre lang=&quot;Java&quot;&gt;
public class Foo {
  private int bar;
  public int getBar() { return bar; }
  public void setBar(int newBar) { bar = newBar; }
}
&lt;/pre&gt;
We&#039;re talking half as much code in Groovy vs. Java.  That&#039;s a huge win, and I was expecting them to be dutifully impressed.  They weren&#039;t, though, and their response kinda stunned me: &quot;Oh, you just use the IDE to generate that.  That&#039;s not really a problem.&quot;</description>
		<content:encoded><![CDATA[<p>@anony2</p>
<p>First of all, you seem to be reading this post as a static typing vs. dynamic typing argument.  It&#8217;s not.  It&#8217;s simply showing some of the features of static typing which aren&#8217;t usually part of the conversation around type systems.</p>
<p>Second, you&#8217;re basically saying that you are callous to the ways in which dynamic typing brings in accidental complexity to your system.  That&#8217;s not a surprise: everyone gets comfortable with their ways of coping with life&#8217;s difficulties, and then it&#8217;s &#8220;no big deal&#8221;.</p>
<p>This habit includes Java people, BTW.  I once showed a Java person this bit of Groovy:</p>

<div class="wp_syntax"><div class="code"><pre class="groovy" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> Foo <span style="color: #66cc66;">&#123;</span>
  <span style="color: #993333;">int</span> bar
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>That code translates (handwave) into the following Java:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Foo <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">int</span> bar<span style="color: #339933;">;</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">int</span> getBar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">return</span> bar<span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> setBar<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> newBar<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> bar <span style="color: #339933;">=</span> newBar<span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>We&#8217;re talking half as much code in Groovy vs. Java.  That&#8217;s a huge win, and I was expecting them to be dutifully impressed.  They weren&#8217;t, though, and their response kinda stunned me: &#8220;Oh, you just use the IDE to generate that.  That&#8217;s not really a problem.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anony2</title>
		<link>http://enfranchisedmind.com/blog/posts/useful-things-about-static-typing/#comment-36814</link>
		<dc:creator>anony2</dc:creator>
		<pubDate>Wed, 26 Aug 2009 23:36:39 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=610#comment-36814</guid>
		<description>Let&#039;s go through each of your 7 steps.

1) Good Information to learn what read evaluate print loop actually meant and nice to see a statically typed language with this.
2) This is a non-point in reality for careful coders as they check for explicit 0&#039;s NUL&#039;s and Falses (unless they are using a language where there is no difference like C). Treating NUL, 0 and False as the same unless they really are is a horrible practice that no-one should indulge in even if the language foolishly lets you.
3) This is also a non-point for careful coders. A careful coder would never employ duck-tying on an object unless they knew it really did behave like the object the code was expecting. I never once had a problem with this, there wasn&#039;t any need to write tests because if I wasn&#039;t 100% certain I wouldn&#039;t use duck-typing.If you need this security you&#039;re doing it wrong. However it was nice to see that you can do this in a statically typed language too.
4) Completely agree, I&#039;ve always just called them API&#039;s.
5) More feature-abuse, lambda&#039;s are Ruby&#039;s real closures and you can pass as many of them around at once as you like.
6) I like OCaml&#039;s syntax, but once again you are going on about the safety of static typing. You wouldn&#039;t go poking around with the ports responsible for reflashing BIOS in C and so long as you follow simple rules while using dynamically typed languages then it&#039;s really a non-issue. In fact, the only type problem I have ever, ever come up with in dynamically typed languages is trying to use reserved words as variable names when I was new to a language and passing the words around instead of the variable I wanted to. Obviously this only happens when you are a newbie to a language and are bound to make mistakes, whatever language you use.

7) This point is also about gaining a type-safety feature that just isn&#039;t necessary unless you write sloppy code.

Your post was interesting, but you could have called it instead &quot;Why you should use a statically typed language if you are unable to control yourself and not abuse the features of a dynamically typed one&quot;.

I don&#039;t understand why people find it so hard to not abuse these features, I really don&#039;t. I don&#039;t take shortcuts like importing things from other namespaces into mine to avoid typing a few extra letters, I always make exclusive checks (if a is nil/nul(l)/none) in flow control statements rather than ambiguous ones (if a then ...), and provide an &quot;else&quot; clause to catch results that should never happen anyway. And I never experience this pain statically typed language enthusiasts think I must do, or have to write these tests as the scenarios they dream up cannot happen in my code.

It&#039;s worth mentioning I grew up on statically typed languages. The only major benefits I can think of for them are:

1) When you have to write code to work with other peoples code and the organisation you are part of is run and staffed by idiots who won&#039;t accept that sloppy code is not OK. I&#039;ve never had a problem with this but I can imagine if you are prepared to work just anywhere it&#039;s a big deal for you (personally I&#039;d rather work in the fields doing labour, than work for a poorly managed IT department that also won&#039;t let me shape policy, in fact, that only just beats out McDonalds for me).

2) The awesome code completion and refactoring you can get in statically typed languages that you just cannot (practically) have to the same level in dynamically typed ones.

All the other ones can be solved by not rm -rf&#039;ing your codes chances at life with lameness.</description>
		<content:encoded><![CDATA[<p>Let&#8217;s go through each of your 7 steps.</p>
<p>1) Good Information to learn what read evaluate print loop actually meant and nice to see a statically typed language with this.<br />
2) This is a non-point in reality for careful coders as they check for explicit 0&#8217;s NUL&#8217;s and Falses (unless they are using a language where there is no difference like C). Treating NUL, 0 and False as the same unless they really are is a horrible practice that no-one should indulge in even if the language foolishly lets you.<br />
3) This is also a non-point for careful coders. A careful coder would never employ duck-tying on an object unless they knew it really did behave like the object the code was expecting. I never once had a problem with this, there wasn&#8217;t any need to write tests because if I wasn&#8217;t 100% certain I wouldn&#8217;t use duck-typing.If you need this security you&#8217;re doing it wrong. However it was nice to see that you can do this in a statically typed language too.<br />
4) Completely agree, I&#8217;ve always just called them API&#8217;s.<br />
5) More feature-abuse, lambda&#8217;s are Ruby&#8217;s real closures and you can pass as many of them around at once as you like.<br />
6) I like OCaml&#8217;s syntax, but once again you are going on about the safety of static typing. You wouldn&#8217;t go poking around with the ports responsible for reflashing BIOS in C and so long as you follow simple rules while using dynamically typed languages then it&#8217;s really a non-issue. In fact, the only type problem I have ever, ever come up with in dynamically typed languages is trying to use reserved words as variable names when I was new to a language and passing the words around instead of the variable I wanted to. Obviously this only happens when you are a newbie to a language and are bound to make mistakes, whatever language you use.</p>
<p>7) This point is also about gaining a type-safety feature that just isn&#8217;t necessary unless you write sloppy code.</p>
<p>Your post was interesting, but you could have called it instead &#8220;Why you should use a statically typed language if you are unable to control yourself and not abuse the features of a dynamically typed one&#8221;.</p>
<p>I don&#8217;t understand why people find it so hard to not abuse these features, I really don&#8217;t. I don&#8217;t take shortcuts like importing things from other namespaces into mine to avoid typing a few extra letters, I always make exclusive checks (if a is nil/nul(l)/none) in flow control statements rather than ambiguous ones (if a then &#8230;), and provide an &#8220;else&#8221; clause to catch results that should never happen anyway. And I never experience this pain statically typed language enthusiasts think I must do, or have to write these tests as the scenarios they dream up cannot happen in my code.</p>
<p>It&#8217;s worth mentioning I grew up on statically typed languages. The only major benefits I can think of for them are:</p>
<p>1) When you have to write code to work with other peoples code and the organisation you are part of is run and staffed by idiots who won&#8217;t accept that sloppy code is not OK. I&#8217;ve never had a problem with this but I can imagine if you are prepared to work just anywhere it&#8217;s a big deal for you (personally I&#8217;d rather work in the fields doing labour, than work for a poorly managed IT department that also won&#8217;t let me shape policy, in fact, that only just beats out McDonalds for me).</p>
<p>2) The awesome code completion and refactoring you can get in statically typed languages that you just cannot (practically) have to the same level in dynamically typed ones.</p>
<p>All the other ones can be solved by not rm -rf&#8217;ing your codes chances at life with lameness.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Blog&#8217;s Most Popular Posts &#124; Enfranchised Mind</title>
		<link>http://enfranchisedmind.com/blog/posts/useful-things-about-static-typing/#comment-34388</link>
		<dc:creator>The Blog&#8217;s Most Popular Posts &#124; Enfranchised Mind</dc:creator>
		<pubDate>Sun, 12 Apr 2009 04:21:18 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=610#comment-34388</guid>
		<description>[...] 7 Actually Useful Things You Didn&#8217;t Know Static Typing Could Do: An Introduction for the Dynam... [...]</description>
		<content:encoded><![CDATA[<p>[...] 7 Actually Useful Things You Didn&#8217;t Know Static Typing Could Do: An Introduction for the Dynam&#8230; [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.381 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-16 22:17:16 -->
<!-- Compression = gzip -->