<?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: Use &#8216;scripting&#8217; languages when possible</title>
	<atom:link href="http://computerlinguist.com/2008/09/04/use-scripting-languages-when-possible/feed/" rel="self" type="application/rss+xml" />
	<link>http://computerlinguist.com/2008/09/04/use-scripting-languages-when-possible/</link>
	<description>The right tool isn't always the most familiar one...</description>
	<lastBuildDate>Sat, 22 Nov 2008 16:03:58 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: computerlinguist</title>
		<link>http://computerlinguist.com/2008/09/04/use-scripting-languages-when-possible/#comment-80</link>
		<dc:creator>computerlinguist</dc:creator>
		<pubDate>Sat, 22 Nov 2008 16:03:58 +0000</pubDate>
		<guid isPermaLink="false">http://computerlinguist.wordpress.com/?p=30#comment-80</guid>
		<description>Well, I think the problem we&#039;re facing today is that modern web apps touch *everything*. They are receiving data and javascript commands, calling web services, talking to the database, calculating data, and rendering tons of XML. 

If you&#039;re doing a focused command-line application, you may be fine with pure functional code or pure OO code. But most modern apps aren&#039;t just dealing with object simulation or calculations. They&#039;re working with lots of data structures, and therefore need dynamic objects and reflection. They need to manipulate sets of data easily, and do concurrent programming. Functional  programming is invaluable when working with data or making algorithms extensible. 

PL/1 suffered from committee design.. But I agree, languages have always been far ahead of the industry as a whole. Think SmallTalk and LISP. LISP never went really mainstream until it got put in Java&#039;s syntax as Javascript. Programmers are hard-headed.

Regarding SQL/LINQ and integrated XML... Those are both easily implemented with dynamic objects and dot operator overloading (Present in most &#039;dynamic&#039; languages). No need for a language addition there.

Regarding concurrent programming... I see a hybrid approach here. Almost all &#039;concurrent&#039; programming is best expressed in the asynchronous begin/end form. For actual calculations (vs. I/O, audio, video, or web-service calls), I like the philosophy of &lt;a href=&quot;http://clojure.org/&quot; rel=&quot;nofollow&quot;&gt;clojure&lt;/a&gt;.

If you actually read my article, you should already know my opinion on contract-based vs. test-based programming.

What languages do you currently use on a day-to-day basis?</description>
		<content:encoded><![CDATA[<p>Well, I think the problem we&#8217;re facing today is that modern web apps touch *everything*. They are receiving data and javascript commands, calling web services, talking to the database, calculating data, and rendering tons of XML. </p>
<p>If you&#8217;re doing a focused command-line application, you may be fine with pure functional code or pure OO code. But most modern apps aren&#8217;t just dealing with object simulation or calculations. They&#8217;re working with lots of data structures, and therefore need dynamic objects and reflection. They need to manipulate sets of data easily, and do concurrent programming. Functional  programming is invaluable when working with data or making algorithms extensible. </p>
<p>PL/1 suffered from committee design.. But I agree, languages have always been far ahead of the industry as a whole. Think SmallTalk and LISP. LISP never went really mainstream until it got put in Java&#8217;s syntax as Javascript. Programmers are hard-headed.</p>
<p>Regarding SQL/LINQ and integrated XML&#8230; Those are both easily implemented with dynamic objects and dot operator overloading (Present in most &#8216;dynamic&#8217; languages). No need for a language addition there.</p>
<p>Regarding concurrent programming&#8230; I see a hybrid approach here. Almost all &#8216;concurrent&#8217; programming is best expressed in the asynchronous begin/end form. For actual calculations (vs. I/O, audio, video, or web-service calls), I like the philosophy of <a href="http://clojure.org/" rel="nofollow">clojure</a>.</p>
<p>If you actually read my article, you should already know my opinion on contract-based vs. test-based programming.</p>
<p>What languages do you currently use on a day-to-day basis?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: davidi</title>
		<link>http://computerlinguist.com/2008/09/04/use-scripting-languages-when-possible/#comment-79</link>
		<dc:creator>davidi</dc:creator>
		<pubDate>Sat, 22 Nov 2008 15:18:11 +0000</pubDate>
		<guid isPermaLink="false">http://computerlinguist.wordpress.com/?p=30#comment-79</guid>
		<description>Why does the &quot;perfect&quot; language have to have everything?  Can&#039;t programming langugages have their focus and capability?  In the 1970s, PL/1 was the language that &quot;had it all&quot; - the best of Fortran, COBOL, and systems programming.  Maybe we should also add to your perfect list - database (SQL/LINQ), XML as a fundamental datatype, Contracts, Mocks, parallel/multi-core types and contructs, and anything else that programming language research comes up with in 2009 and beyond.   Focused languages and language interop seem to be a good way forward.</description>
		<content:encoded><![CDATA[<p>Why does the &#8220;perfect&#8221; language have to have everything?  Can&#8217;t programming langugages have their focus and capability?  In the 1970s, PL/1 was the language that &#8220;had it all&#8221; &#8211; the best of Fortran, COBOL, and systems programming.  Maybe we should also add to your perfect list &#8211; database (SQL/LINQ), XML as a fundamental datatype, Contracts, Mocks, parallel/multi-core types and contructs, and anything else that programming language research comes up with in 2009 and beyond.   Focused languages and language interop seem to be a good way forward.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ricky Clarkson</title>
		<link>http://computerlinguist.com/2008/09/04/use-scripting-languages-when-possible/#comment-78</link>
		<dc:creator>Ricky Clarkson</dc:creator>
		<pubDate>Sun, 16 Nov 2008 17:39:36 +0000</pubDate>
		<guid isPermaLink="false">http://computerlinguist.wordpress.com/?p=30#comment-78</guid>
		<description>Scala is worth looking into, but it isn&#039;t a silver bullet.  There are a number of syntactic oddities.  F# looks like it&#039;s a more consistent language (with similar features), but I haven&#039;t looked into it enough, not least because I don&#039;t normally run Windows.

C# is actually a bit of an improvement, e.g., var s = &quot;hello&quot;; s is typed as a String.  And C# has talented language designers, so it is certainly one to watch.

The point really is that typed languages don&#039;t have to have unreadable code.  It&#039;s just that the mainstream ones tend to, though this is likely to change, slowly.</description>
		<content:encoded><![CDATA[<p>Scala is worth looking into, but it isn&#8217;t a silver bullet.  There are a number of syntactic oddities.  F# looks like it&#8217;s a more consistent language (with similar features), but I haven&#8217;t looked into it enough, not least because I don&#8217;t normally run Windows.</p>
<p>C# is actually a bit of an improvement, e.g., var s = &#8220;hello&#8221;; s is typed as a String.  And C# has talented language designers, so it is certainly one to watch.</p>
<p>The point really is that typed languages don&#8217;t have to have unreadable code.  It&#8217;s just that the mainstream ones tend to, though this is likely to change, slowly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: computerlinguist</title>
		<link>http://computerlinguist.com/2008/09/04/use-scripting-languages-when-possible/#comment-77</link>
		<dc:creator>computerlinguist</dc:creator>
		<pubDate>Sun, 16 Nov 2008 13:48:49 +0000</pubDate>
		<guid isPermaLink="false">http://computerlinguist.wordpress.com/?p=30#comment-77</guid>
		<description>Well, I think we both agree that the C/C++/Java/C# type system is an utter failure... And while I had previously thought of Scala as being an extension of the same bad idea, your examples have convinced me that Scala is actually worth looking in to.

Strangely enough, from looking at Scala&#039;s feature set you might mistake it for one of the dynamic languages. I&#039;d assumed that (like C# and Java), each of those &#039;dynamic&#039; features would introduce syntactical overhead since the behavior isn&#039;t inherent to the language approach.

I&#039;ll probably have to try a small app in Scala to see whether the type system gets in my way or not... If structural typing is the default, then Scala might just make it onto my &#039;list&#039;. :)</description>
		<content:encoded><![CDATA[<p>Well, I think we both agree that the C/C++/Java/C# type system is an utter failure&#8230; And while I had previously thought of Scala as being an extension of the same bad idea, your examples have convinced me that Scala is actually worth looking in to.</p>
<p>Strangely enough, from looking at Scala&#8217;s feature set you might mistake it for one of the dynamic languages. I&#8217;d assumed that (like C# and Java), each of those &#8216;dynamic&#8217; features would introduce syntactical overhead since the behavior isn&#8217;t inherent to the language approach.</p>
<p>I&#8217;ll probably have to try a small app in Scala to see whether the type system gets in my way or not&#8230; If structural typing is the default, then Scala might just make it onto my &#8216;list&#8217;. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ricky Clarkson</title>
		<link>http://computerlinguist.com/2008/09/04/use-scripting-languages-when-possible/#comment-76</link>
		<dc:creator>Ricky Clarkson</dc:creator>
		<pubDate>Sun, 16 Nov 2008 12:33:02 +0000</pubDate>
		<guid isPermaLink="false">http://computerlinguist.wordpress.com/?p=30#comment-76</guid>
		<description>I missed something in the ScalaCheck example.  The &#039;generator&#039; for EventsCGI objects is not actually passed into the property method, so to implement this in Ruby you would probably have to have some kind of map of &#039;types&#039; to generators, which would be a global mutable data structure, whereas in Scala it&#039;s an implicit parameter.  The type system is helping here by choosing the correct &#039;implicit value&#039; from the surrounding scope.</description>
		<content:encoded><![CDATA[<p>I missed something in the ScalaCheck example.  The &#8216;generator&#8217; for EventsCGI objects is not actually passed into the property method, so to implement this in Ruby you would probably have to have some kind of map of &#8216;types&#8217; to generators, which would be a global mutable data structure, whereas in Scala it&#8217;s an implicit parameter.  The type system is helping here by choosing the correct &#8216;implicit value&#8217; from the surrounding scope.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ricky Clarkson</title>
		<link>http://computerlinguist.com/2008/09/04/use-scripting-languages-when-possible/#comment-75</link>
		<dc:creator>Ricky Clarkson</dc:creator>
		<pubDate>Sun, 16 Nov 2008 12:30:14 +0000</pubDate>
		<guid isPermaLink="false">http://computerlinguist.wordpress.com/?p=30#comment-75</guid>
		<description>&gt;&gt; A potential problem is that there’s no real way to know whether the method means to the object’s author what it means to you. aBath.run is quite different to anAthlete.run.

&gt; Can you say you have ever encountered this in a real application?

I said &#039;potential&#039;.

&gt; Static typing provides a false sense of security just like compile-time checks do.

Actually, types prove that certain categories of runtime errors are impossible.  They can do much more than catch typos.  It&#039;s a shame that most people&#039;s experience of types is from C, C++ and Java, because I can&#039;t think of worse implementations of it.  People have a wider view of untyped languages than of typed ones.

For example, if I am working outside an IDE I can do a refactor, and generally the code won&#039;t compile until I have fixed all the resulting problems.  This is even true within an IDE, as IDEs don&#039;t support every refactor you might want.

Support for typing in the language helps me, a programmer who thinks in types, because it helps me to keep track of things.  If I&#039;ve made an error in my thoughts, I&#039;ll get a compile error.

&gt; Compile-time checking is really just a productivity feature.

That&#039;s a non-argument.  You could argue that anything above assembler is a productivity feature.

&gt; Static typing helps catch a small class of typos, but causes an incredible amount of programmer overhead.

I hope I&#039;ve addressed the typos bit above.  Whether it causes programmer overhead depends on the programmer and the type system.

&gt;&gt; Types can express a lot more than you might expect. They can make unit tests unnecessary (or at least smaller), and in the case of QuickCheck/ScalaCheck they can improve unit tests no end.

&gt; I’m no Scala expert - could you provide a real-world example of this?

This is from my current codebase; it&#039;s a ScalaCheck test inside a Specs specification:

&quot;Converting an EventsCGI to a String and back&quot; should {
  &quot;not be lossy&quot; in {
    property { e: EventsCGI =&gt; { EventsCGI.fromURL(e.toString).toString == e.toString } } must pass
  }
}

ScalaCheck will generate up to 500 EventsCGI objects (according to rules I defined elsewhere), and run this test on them.  When it finds a failure, it will try to &#039;shrink&#039; the failure case, meaning that it generates more EventsCGI objects but with smaller values and runs the test again, so that the developer gets a small value.  I can&#039;t really paste more than that, which is the downside of asking for a real-world example.  It also doesn&#039;t really show off type inference, but the ScalaCheck docs should do that.</description>
		<content:encoded><![CDATA[<p>&gt;&gt; A potential problem is that there’s no real way to know whether the method means to the object’s author what it means to you. aBath.run is quite different to anAthlete.run.</p>
<p>&gt; Can you say you have ever encountered this in a real application?</p>
<p>I said &#8216;potential&#8217;.</p>
<p>&gt; Static typing provides a false sense of security just like compile-time checks do.</p>
<p>Actually, types prove that certain categories of runtime errors are impossible.  They can do much more than catch typos.  It&#8217;s a shame that most people&#8217;s experience of types is from C, C++ and Java, because I can&#8217;t think of worse implementations of it.  People have a wider view of untyped languages than of typed ones.</p>
<p>For example, if I am working outside an IDE I can do a refactor, and generally the code won&#8217;t compile until I have fixed all the resulting problems.  This is even true within an IDE, as IDEs don&#8217;t support every refactor you might want.</p>
<p>Support for typing in the language helps me, a programmer who thinks in types, because it helps me to keep track of things.  If I&#8217;ve made an error in my thoughts, I&#8217;ll get a compile error.</p>
<p>&gt; Compile-time checking is really just a productivity feature.</p>
<p>That&#8217;s a non-argument.  You could argue that anything above assembler is a productivity feature.</p>
<p>&gt; Static typing helps catch a small class of typos, but causes an incredible amount of programmer overhead.</p>
<p>I hope I&#8217;ve addressed the typos bit above.  Whether it causes programmer overhead depends on the programmer and the type system.</p>
<p>&gt;&gt; Types can express a lot more than you might expect. They can make unit tests unnecessary (or at least smaller), and in the case of QuickCheck/ScalaCheck they can improve unit tests no end.</p>
<p>&gt; I’m no Scala expert &#8211; could you provide a real-world example of this?</p>
<p>This is from my current codebase; it&#8217;s a ScalaCheck test inside a Specs specification:</p>
<p>&#8220;Converting an EventsCGI to a String and back&#8221; should {<br />
  &#8220;not be lossy&#8221; in {<br />
    property { e: EventsCGI =&gt; { EventsCGI.fromURL(e.toString).toString == e.toString } } must pass<br />
  }<br />
}</p>
<p>ScalaCheck will generate up to 500 EventsCGI objects (according to rules I defined elsewhere), and run this test on them.  When it finds a failure, it will try to &#8216;shrink&#8217; the failure case, meaning that it generates more EventsCGI objects but with smaller values and runs the test again, so that the developer gets a small value.  I can&#8217;t really paste more than that, which is the downside of asking for a real-world example.  It also doesn&#8217;t really show off type inference, but the ScalaCheck docs should do that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: computerlinguist</title>
		<link>http://computerlinguist.com/2008/09/04/use-scripting-languages-when-possible/#comment-74</link>
		<dc:creator>computerlinguist</dc:creator>
		<pubDate>Sun, 16 Nov 2008 04:11:32 +0000</pubDate>
		<guid isPermaLink="false">http://computerlinguist.wordpress.com/?p=30#comment-74</guid>
		<description>&gt; A potential problem is that there’s no real way to know whether the method means to the object’s author what it means to you. aBath.run is quite different to anAthlete.run.

Can you say you have ever encountered this in a real application?

&gt;More importantly, not having types available makes it hard to think in types, i.e., it makes it hard to reason about your code.

I don&#039;t think it makes it harder to reason about your code at all. Static typing provides a false sense of security just like compile-time checks do. Compile-time checking is really just a productivity feature. Static typing helps catch a small class of typos, but causes an incredible amount of programmer overhead. 


&gt; Types can express a lot more than you might expect. They can make unit tests unnecessary (or at least smaller), and in the case of QuickCheck/ScalaCheck they can improve unit tests no end.

I&#039;m no Scala expert - could you provide a real-world example of this?</description>
		<content:encoded><![CDATA[<p>&gt; A potential problem is that there’s no real way to know whether the method means to the object’s author what it means to you. aBath.run is quite different to anAthlete.run.</p>
<p>Can you say you have ever encountered this in a real application?</p>
<p>&gt;More importantly, not having types available makes it hard to think in types, i.e., it makes it hard to reason about your code.</p>
<p>I don&#8217;t think it makes it harder to reason about your code at all. Static typing provides a false sense of security just like compile-time checks do. Compile-time checking is really just a productivity feature. Static typing helps catch a small class of typos, but causes an incredible amount of programmer overhead. </p>
<p>&gt; Types can express a lot more than you might expect. They can make unit tests unnecessary (or at least smaller), and in the case of QuickCheck/ScalaCheck they can improve unit tests no end.</p>
<p>I&#8217;m no Scala expert &#8211; could you provide a real-world example of this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ricky Clarkson</title>
		<link>http://computerlinguist.com/2008/09/04/use-scripting-languages-when-possible/#comment-73</link>
		<dc:creator>Ricky Clarkson</dc:creator>
		<pubDate>Sun, 16 Nov 2008 02:51:33 +0000</pubDate>
		<guid isPermaLink="false">http://computerlinguist.wordpress.com/?p=30#comment-73</guid>
		<description>You can have such quackery in a static language, for example, Scala&#039;s structural typing.

scala&gt; def doDuckLikeThings(duck: { def walk: Unit; def quack: Unit }) = { duck.walk; duck.quack }
doDuckLikeThings: (AnyRef{def walk: Unit; def quack: Unit})Unit

scala&gt; class Swan { def walk = println(&quot;I&#039;m walking&quot;); def quack = println(&quot;waaak&quot;) }
defined class Swan

scala&gt; doDuckLikeThings(new Swan)
I&#039;m walking
waaak

A potential problem is that there&#039;s no real way to know whether the method means to the object&#039;s author what it means to you.  aBath.run is quite different to anAthlete.run.  More importantly, not having types available makes it hard to think in types, i.e., it makes it hard to reason about your code.  Types can express a lot more than you might expect.  They can make unit tests unnecessary (or at least smaller), and in the case of QuickCheck/ScalaCheck they can improve unit tests no end.</description>
		<content:encoded><![CDATA[<p>You can have such quackery in a static language, for example, Scala&#8217;s structural typing.</p>
<p>scala&gt; def doDuckLikeThings(duck: { def walk: Unit; def quack: Unit }) = { duck.walk; duck.quack }<br />
doDuckLikeThings: (AnyRef{def walk: Unit; def quack: Unit})Unit</p>
<p>scala&gt; class Swan { def walk = println(&#8220;I&#8217;m walking&#8221;); def quack = println(&#8220;waaak&#8221;) }<br />
defined class Swan</p>
<p>scala&gt; doDuckLikeThings(new Swan)<br />
I&#8217;m walking<br />
waaak</p>
<p>A potential problem is that there&#8217;s no real way to know whether the method means to the object&#8217;s author what it means to you.  aBath.run is quite different to anAthlete.run.  More importantly, not having types available makes it hard to think in types, i.e., it makes it hard to reason about your code.  Types can express a lot more than you might expect.  They can make unit tests unnecessary (or at least smaller), and in the case of QuickCheck/ScalaCheck they can improve unit tests no end.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: computerlinguist</title>
		<link>http://computerlinguist.com/2008/09/04/use-scripting-languages-when-possible/#comment-70</link>
		<dc:creator>computerlinguist</dc:creator>
		<pubDate>Sat, 15 Nov 2008 02:29:52 +0000</pubDate>
		<guid isPermaLink="false">http://computerlinguist.wordpress.com/?p=30#comment-70</guid>
		<description>Sorry, meant duck typing - good catch. 

Type inference does mitigate the problem slightly (It&#039;s appearing in many static languages now), but here&#039;s the question:

If it walks like a duck and quacks like a duck.... Can we let it in with the other ducks? Or does it need an license?

When it&#039;s so easy to check to see how the duck walks and quacks... Why deal with the overhead and limitations of the license? 

In my opinion, contractual programming is a case of premature optimization on a severe scale.</description>
		<content:encoded><![CDATA[<p>Sorry, meant duck typing &#8211; good catch. </p>
<p>Type inference does mitigate the problem slightly (It&#8217;s appearing in many static languages now), but here&#8217;s the question:</p>
<p>If it walks like a duck and quacks like a duck&#8230;. Can we let it in with the other ducks? Or does it need an license?</p>
<p>When it&#8217;s so easy to check to see how the duck walks and quacks&#8230; Why deal with the overhead and limitations of the license? </p>
<p>In my opinion, contractual programming is a case of premature optimization on a severe scale.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ricky Clarkson</title>
		<link>http://computerlinguist.com/2008/09/04/use-scripting-languages-when-possible/#comment-69</link>
		<dc:creator>Ricky Clarkson</dc:creator>
		<pubDate>Sat, 15 Nov 2008 02:09:23 +0000</pubDate>
		<guid isPermaLink="false">http://computerlinguist.wordpress.com/?p=30#comment-69</guid>
		<description>You might be missing out on some good statically-typed languages here.  Consider Haskell, Scala and F#, all statically-typed, but with (varying) type inference, so the types don&#039;t have to get in the way.

Where they don&#039;t support something, support can be added.  For example, Haskell doesn&#039;t support OOP out of the box, but you can add that as a library (I believe such a library exists).

None of the languages you listed satisfy one of your checks for high-level language; implicit typing.  They are all untyped languages.</description>
		<content:encoded><![CDATA[<p>You might be missing out on some good statically-typed languages here.  Consider Haskell, Scala and F#, all statically-typed, but with (varying) type inference, so the types don&#8217;t have to get in the way.</p>
<p>Where they don&#8217;t support something, support can be added.  For example, Haskell doesn&#8217;t support OOP out of the box, but you can add that as a library (I believe such a library exists).</p>
<p>None of the languages you listed satisfy one of your checks for high-level language; implicit typing.  They are all untyped languages.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
