<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Object Mentor Blog: Protecting Developers from Powerful Languages</title>
    <link>http://blog.objectmentor.com/articles/2007/01/15/protecting-developers-from-powerful-languages</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Protecting Developers from Powerful Languages</title>
      <description>&lt;p&gt;Microsoft&amp;#8217;s forthcoming C# version 3 has some innovative features, as described in this &lt;a href="http://tomasp.net/articles/csharp3-concepts.aspx"&gt;blog&lt;/a&gt;. I give the C# team credit for pushing the boundaries of C#, in part because they have forced the Java community to follow suit. ;)
&lt;/p&gt;
&lt;p&gt;A common tension in many development shops is how far to trust the developers with languages and tools that are perceived to be &amp;#8220;advanced&amp;#8221;. It&amp;#8217;s tempting to limit developers to &amp;#8220;safe&amp;#8221; languages and maybe not all the features of those languages. This can be misguided.&lt;/p&gt;

&lt;p&gt;Java is usually considered safe, but Java Generics are suspect. Strong typing is safe, but dynamic typing isn&amp;#8217;t controlled enough. Closures and continuations sound too advanced and technical to be trusted in the hands of &amp;#8220;our team&amp;#8221;.&lt;/p&gt;
&lt;p&gt;To be fair, larger organizations have more at stake and caution is prudent. Regrettably, it is also true that many people in our profession are &amp;#8230; hmm &amp;#8230; not that well qualified.&lt;/p&gt;
&lt;p&gt;However, I find that I&amp;#8217;m far more productive and less likely to make mistakes using Ruby iterators with closures than writing more verbose and inelegant  Java.&lt;/p&gt;
&lt;p&gt;I used to be a strong believer in static typing, but it has become a distraction, as I have to worry more about the types of method parameters and return values, rather than just worrying about the &lt;i&gt;values&lt;/i&gt; themselves. I realized that, on average in a typical section of code, the actual type of a variable is unimportant. The variable is just a &amp;#8220;handle&amp;#8221; being passed around. The name is always important, as it is a form of documentation. There are places where the type &lt;i&gt;is&lt;/i&gt; important, of course, when the variable is read or written in some way.&lt;/p&gt;
&lt;p&gt;Finally, static typing offers less security than at first appears. At best, it only confirms that variables of particular types are used consistently. Your unit tests also do this. However, static typing can&amp;#8217;t confirm that the &lt;i&gt;usage&lt;/i&gt; of the &lt;span class="caps"&gt;API&lt;/span&gt; is correct. This is analogous to testing the &lt;i&gt;syntax&lt;/i&gt; but not the &lt;i&gt;semantics&lt;/i&gt; of the program. In fact, only unit tests (or alternatives, like &lt;a href="http://rspec.rubyforge.org"&gt;rspec&lt;/a&gt; ) are effective at testing both.&lt;/p&gt; 
&lt;p&gt;So, it&amp;#8217;s prudent to be reticent about newer languages and features, but make sure the decisions you make about them are backed up by careful evaluation and don&amp;#8217;t forget to train your team appropriately!&lt;/p&gt;</description>
      <pubDate>Mon, 15 Jan 2007 21:57:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:bbefa294-6ed3-4a00-aa59-25b369d7c408</guid>
      <author>Dean Wampler</author>
      <link>http://blog.objectmentor.com/articles/2007/01/15/protecting-developers-from-powerful-languages</link>
      <category>Dean's Deprecations</category>
      <category>Java</category>
      <category>Ruby</category>
      <category>languages</category>
      <category>development</category>
    </item>
    <item>
      <title>"Protecting Developers from Powerful Languages" by Ramon Leon</title>
      <description>&lt;p&gt;Smalltalk has intellisense, and refactoring browsers.&lt;/p&gt;</description>
      <pubDate>Tue, 23 Jan 2007 01:30:28 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:95d6036d-ff29-4238-8e7e-4bb2fbf16a30</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/15/protecting-developers-from-powerful-languages#comment-44</link>
    </item>
    <item>
      <title>"Protecting Developers from Powerful Languages" by Dean Wampler</title>
      <description>&lt;p&gt;All &amp;#8211; I agree that better statically-typed languages exist and I have a big TODO list to learn some of them! Of course, my arguments are based a lot on the practical situations I find myself in.&lt;/p&gt;


	&lt;p&gt;Jonathan &amp;#8211; I guess I don&amp;#8217;t find the time trade-off of making my unit tests a little better at &amp;#8220;syntax&amp;#8221; checking that bad. The &amp;#8220;total cost of effort&amp;#8221; seems to favor dynamic languages. Maybe it&amp;#8217;s a personal preference.&lt;/p&gt;</description>
      <pubDate>Fri, 19 Jan 2007 15:08:07 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:1dcdb563-081d-4894-9d8a-be9b24bd7b17</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/15/protecting-developers-from-powerful-languages#comment-42</link>
    </item>
    <item>
      <title>"Protecting Developers from Powerful Languages" by David Chelimsky</title>
      <description>&lt;p&gt;Jeff &amp;#8211; being committed to TDD, I find that intellisense gets in my way more often than it helps. Maybe that&amp;#8217;s just me.&lt;/p&gt;</description>
      <pubDate>Fri, 19 Jan 2007 12:07:58 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:efc76ae2-480d-4c8b-8b08-58491a7ecca8</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/15/protecting-developers-from-powerful-languages#comment-41</link>
    </item>
    <item>
      <title>"Protecting Developers from Powerful Languages" by Jeff L.</title>
      <description>&lt;p&gt;What of tools that are more effective in statically typed languages? To some extent they&amp;#8217;re not as important, but I&amp;#8217;d certainly miss intellisense were I to go back to Smalltalk or dig deeper into Ruby.&lt;/p&gt;


	&lt;p&gt;j&lt;/p&gt;</description>
      <pubDate>Fri, 19 Jan 2007 11:51:22 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:0cbb5b1a-45b2-4c44-8387-8c863f0d0419</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/15/protecting-developers-from-powerful-languages#comment-40</link>
    </item>
    <item>
      <title>"Protecting Developers from Powerful Languages" by Masklinn</title>
      <description>&lt;p&gt;Dean &amp;gt; I tend to agree with Greg here: I got on that road (of hating static typing and preferring dynamically typed languages if only because they weren&amp;#8217;t statically typed) before I discovered that all the things I hated in static typing, and all the things you hate (verbosity, lack of flexibility, redundancy, lack of &amp;#8220;real&amp;#8221; security) were really failure of Java, not of static type systems in general.&lt;/p&gt;


	&lt;p&gt;Then I discovered Haskell, and it blew my mind what you could get done with a static type system.&lt;/p&gt;


	&lt;p&gt;Now don&amp;#8217;t get me wrong, I still find static type systems annoying from time to time, and I still love dynamically typed languages (I&amp;#8217;m very fond of Python, Ruby and Erlang, and intend to learn Smalltalk in the future), but static type systems do have their use, and static type systems done well don&amp;#8217;t hinder flexibility much while generating wealth of expressive power and safety (yes, I said it, and I&amp;#8217;m not talking about Java here).&lt;/p&gt;</description>
      <pubDate>Thu, 18 Jan 2007 03:54:11 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:2fa8e6e6-2dcb-4572-a2e5-15d140e163cf</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/15/protecting-developers-from-powerful-languages#comment-37</link>
    </item>
    <item>
      <title>"Protecting Developers from Powerful Languages" by Greg Buchholz</title>
      <description>&lt;p&gt;Maybe you&amp;#8217;d like to try a language with a better, more &lt;a href="http://kerneltrap.org/node/5591" rel="nofollow"&gt;modern&lt;/a&gt; type system.  Something like&amp;#8230;&lt;/p&gt;


&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.haskell.org/haskellwiki/Haskell" rel="nofollow"&gt;Haskell&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://clean.cs.ru.nl/" rel="nofollow"&gt;Clean&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Standard_ML" rel="nofollow"&gt;ML&lt;/a&gt;/&lt;a href="http://caml.inria.fr/" rel="nofollow"&gt;Objective CAML&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.cs.mu.oz.au/research/mercury/" rel="nofollow"&gt;Mercury&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://web.cecs.pdx.edu/~sheard/papers/LangOfTheFuture.ps" rel="nofollow"&gt;Omega&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <pubDate>Wed, 17 Jan 2007 18:32:25 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:3f9ce579-929b-432f-8733-ff9ed034300e</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/15/protecting-developers-from-powerful-languages#comment-36</link>
    </item>
    <item>
      <title>"Protecting Developers from Powerful Languages" by Jonathan Allen</title>
      <description>&lt;p&gt;I agree with most of what you say, but this last bit rubs me the wrong way.&lt;/p&gt;


	&lt;p&gt;&amp;gt; Your unit tests also do this. However, static typing can&#226;&#8364;&#8482;t confirm that the usage of the API is correct. This is analogous to testing the syntax but not the semantics of the program. In fact, only unit tests (or alternatives, like rspec ) are effective at testing both.&lt;/p&gt;


	&lt;p&gt;I don&amp;#8217;t belive that to be true. It seems to me that manually creating unit tests is a poor substitution for knowing that syntax is correct. The compiler is far less likely to remember to test a particular code path than you are.&lt;/p&gt;


	&lt;p&gt;Moreover, time for testing activities is always limited. Given the choice, I would rather spend all of my unit testing time on semantics than spend half of it on syntax when a good compiler can do for me.&lt;/p&gt;


	&lt;p&gt;So you know where I&amp;#8217;m coming from, I am a long time VB programmer who has made the transition from loosely typed pre-.NET era to strictly typed systems of VB7+. I have noticed significant gains in both performance and correctness as a result of this change.&lt;/p&gt;


	&lt;p&gt;This is not to say I don&amp;#8217;t see the benefits for a smarter type system that heavily relies on generics and type inferance to reduce the cost of static typing.&lt;/p&gt;</description>
      <pubDate>Wed, 17 Jan 2007 17:00:19 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:2ea3c186-48da-424e-b364-1a0101c1d1bf</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/15/protecting-developers-from-powerful-languages#comment-35</link>
    </item>
  </channel>
</rss>
