<?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/"
		>
<channel>
	<title>Comments on: The Scala programming language: My First Impressions</title>
	<atom:link href="http://danweinreb.org/blog/the-scala-programming-language-my-first-impressions/feed" rel="self" type="application/rss+xml" />
	<link>http://danweinreb.org/blog/the-scala-programming-language-my-first-impressions</link>
	<description>Software and Innovation</description>
	<lastBuildDate>Sun, 10 Jul 2011 14:13:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: hackinghat.com &#187; That Funny Nose Thing Again</title>
		<link>http://danweinreb.org/blog/the-scala-programming-language-my-first-impressions/comment-page-1#comment-254</link>
		<dc:creator>hackinghat.com &#187; That Funny Nose Thing Again</dc:creator>
		<pubDate>Thu, 10 Jan 2008 22:25:56 +0000</pubDate>
		<guid isPermaLink="false">http://dlweinreb.wordpress.com/2007/12/25/the-scala-programming-language-my-first-impressions/#comment-254</guid>
		<description>[...] I think I&#8217;ll do what Dan Weinreb&#8217;s going to do and just keep an eye on Scala to see what happens next. Now, since he is way smarter [...]</description>
		<content:encoded><![CDATA[<p>[...] I think I&#8217;ll do what Dan Weinreb&#8217;s going to do and just keep an eye on Scala to see what happens next. Now, since he is way smarter [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Lamb</title>
		<link>http://danweinreb.org/blog/the-scala-programming-language-my-first-impressions/comment-page-1#comment-253</link>
		<dc:creator>Charles Lamb</dc:creator>
		<pubDate>Mon, 31 Dec 2007 17:47:12 +0000</pubDate>
		<guid isPermaLink="false">http://dlweinreb.wordpress.com/2007/12/25/the-scala-programming-language-my-first-impressions/#comment-253</guid>
		<description>Nice review Dan.  Berkeley DB Java Edition also works with Scala.  See this OTN post for details.

http://forums.oracle.com/forums/thread.jspa?threadID=594269&amp;tstart=15

-cwl</description>
		<content:encoded><![CDATA[<p>Nice review Dan.  Berkeley DB Java Edition also works with Scala.  See this OTN post for details.</p>
<p><a href="http://forums.oracle.com/forums/thread.jspa?threadID=594269&#038;tstart=15" rel="nofollow">http://forums.oracle.com/forums/thread.jspa?threadID=594269&#038;tstart=15</a></p>
<p>-cwl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dlweinreb</title>
		<link>http://danweinreb.org/blog/the-scala-programming-language-my-first-impressions/comment-page-1#comment-252</link>
		<dc:creator>dlweinreb</dc:creator>
		<pubDate>Sun, 30 Dec 2007 13:45:27 +0000</pubDate>
		<guid isPermaLink="false">http://dlweinreb.wordpress.com/2007/12/25/the-scala-programming-language-my-first-impressions/#comment-252</guid>
		<description>Andy: If you mutate an existing object, and the object has been tenured, that can cause a crossing of the &quot;write barrier&quot;, as the GC has to worry that maybe you are storing a pointer from tenured (old object) space to the new object space and thus making the new object non-garbage.  (Actually it&#039;s been so long since I was up on this stuff that I&#039;m not sure I&#039;m right about how this works, so if you really need to know, I suggest that you read up on generational GC algorithms rather than take my word for it.)</description>
		<content:encoded><![CDATA[<p>Andy: If you mutate an existing object, and the object has been tenured, that can cause a crossing of the &#8220;write barrier&#8221;, as the GC has to worry that maybe you are storing a pointer from tenured (old object) space to the new object space and thus making the new object non-garbage.  (Actually it&#8217;s been so long since I was up on this stuff that I&#8217;m not sure I&#8217;m right about how this works, so if you really need to know, I suggest that you read up on generational GC algorithms rather than take my word for it.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Lorch</title>
		<link>http://danweinreb.org/blog/the-scala-programming-language-my-first-impressions/comment-page-1#comment-251</link>
		<dc:creator>Daniel Lorch</dc:creator>
		<pubDate>Sat, 29 Dec 2007 10:09:51 +0000</pubDate>
		<guid isPermaLink="false">http://dlweinreb.wordpress.com/2007/12/25/the-scala-programming-language-my-first-impressions/#comment-251</guid>
		<description>@dlweinreb

&quot;class&quot; definitions have to be instantiated, like in Java. &quot;object&quot; definitions are singletons (they only contain static members):

  object SimpleGreeter {
    private val greeting = “Hello, world!”
    def greet = println(greeting)
  }

  SimpleGreeter.greet

Note that the parentheses after method calls are optional. By convention, Scala programmers write them if the method call has side effects, and leave them out otherwise (for example a getter has no parentheses).

In your example of &quot;max&quot;, the result type (Int) is explicitly mentioned, the example code should probably read:

 def max(x: Int, y: Int) = if (x &lt; y) y else x

Variable types of arguments have to be explicitly mentioned, because they cannot be &quot;guessed&quot; from the context.

Traits are like abstract classes or interfaces, with the exception that they have no constructors. This allows Scala to do multiple inheritance. Traits are described here: http://www.iam.unibe.ch/~scg/Research/Traits/

Thanks for the review! By the way, I was a student of Martin Odersky&#039;s course of &quot;Power Java&quot;. One of our assignments was to write a simple LISP interpreter in Scala (with REPL). You might be interested:

http://lampwww.epfl.ch/teaching/archive/programmation_4/2007/exercises/project6/project6.pdf
http://lampwww.epfl.ch/teaching/archive/programmation_4/2007/exercises/project6/lisp-partial.scala</description>
		<content:encoded><![CDATA[<p>@dlweinreb</p>
<p>&#8220;class&#8221; definitions have to be instantiated, like in Java. &#8220;object&#8221; definitions are singletons (they only contain static members):</p>
<p>  object SimpleGreeter {<br />
    private val greeting = “Hello, world!”<br />
    def greet = println(greeting)<br />
  }</p>
<p>  SimpleGreeter.greet</p>
<p>Note that the parentheses after method calls are optional. By convention, Scala programmers write them if the method call has side effects, and leave them out otherwise (for example a getter has no parentheses).</p>
<p>In your example of &#8220;max&#8221;, the result type (Int) is explicitly mentioned, the example code should probably read:</p>
<p> def max(x: Int, y: Int) = if (x &lt; y) y else x</p>
<p>Variable types of arguments have to be explicitly mentioned, because they cannot be &#8220;guessed&#8221; from the context.</p>
<p>Traits are like abstract classes or interfaces, with the exception that they have no constructors. This allows Scala to do multiple inheritance. Traits are described here: <a href="http://www.iam.unibe.ch/~scg/Research/Traits/" rel="nofollow">http://www.iam.unibe.ch/~scg/Research/Traits/</a></p>
<p>Thanks for the review! By the way, I was a student of Martin Odersky&#8217;s course of &#8220;Power Java&#8221;. One of our assignments was to write a simple LISP interpreter in Scala (with REPL). You might be interested:</p>
<p><a href="http://lampwww.epfl.ch/teaching/archive/programmation_4/2007/exercises/project6/project6.pdf" rel="nofollow">http://lampwww.epfl.ch/teaching/archive/programmation_4/2007/exercises/project6/project6.pdf</a><br />
<a href="http://lampwww.epfl.ch/teaching/archive/programmation_4/2007/exercises/project6/lisp-partial.scala" rel="nofollow">http://lampwww.epfl.ch/teaching/archive/programmation_4/2007/exercises/project6/lisp-partial.scala</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Harrop</title>
		<link>http://danweinreb.org/blog/the-scala-programming-language-my-first-impressions/comment-page-1#comment-250</link>
		<dc:creator>Jon Harrop</dc:creator>
		<pubDate>Sat, 29 Dec 2007 09:43:29 +0000</pubDate>
		<guid isPermaLink="false">http://dlweinreb.wordpress.com/2007/12/25/the-scala-programming-language-my-first-impressions/#comment-250</guid>
		<description>ML is a family of impure functional programming languages of which OCaml is the most popular with ~100x as many users as Scala.</description>
		<content:encoded><![CDATA[<p>ML is a family of impure functional programming languages of which OCaml is the most popular with ~100x as many users as Scala.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean McDirmid</title>
		<link>http://danweinreb.org/blog/the-scala-programming-language-my-first-impressions/comment-page-1#comment-249</link>
		<dc:creator>Sean McDirmid</dc:creator>
		<pubDate>Sat, 29 Dec 2007 00:37:05 +0000</pubDate>
		<guid isPermaLink="false">http://dlweinreb.wordpress.com/2007/12/25/the-scala-programming-language-my-first-impressions/#comment-249</guid>
		<description>The eclipse plugin supports incremental compilation, and when combined with the JVM&#039;s support for hot swapping, you can edit your program while its running. This is given the limitations of the JVM: if you add a new method or class, your debugging session has to be restarted. Unfortunately, this includes closures (which compile down to JVM classes). Hopefully Sun will fix this when they add closures to Java.</description>
		<content:encoded><![CDATA[<p>The eclipse plugin supports incremental compilation, and when combined with the JVM&#8217;s support for hot swapping, you can edit your program while its running. This is given the limitations of the JVM: if you add a new method or class, your debugging session has to be restarted. Unfortunately, this includes closures (which compile down to JVM classes). Hopefully Sun will fix this when they add closures to Java.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrei</title>
		<link>http://danweinreb.org/blog/the-scala-programming-language-my-first-impressions/comment-page-1#comment-248</link>
		<dc:creator>Andrei</dc:creator>
		<pubDate>Fri, 28 Dec 2007 22:41:52 +0000</pubDate>
		<guid isPermaLink="false">http://dlweinreb.wordpress.com/2007/12/25/the-scala-programming-language-my-first-impressions/#comment-248</guid>
		<description>Also, in ML you actually can choose if you want a curried function or not. In OCaml syntax:

fun x y -&gt; x + y has type int -&gt; int -&gt; int, curried;

fun (x, y) -&gt; x + y has type int * int -&gt; int, the single argument is a tuple, so this function can&#039;t be curried.</description>
		<content:encoded><![CDATA[<p>Also, in ML you actually can choose if you want a curried function or not. In OCaml syntax:</p>
<p>fun x y -&gt; x + y has type int -&gt; int -&gt; int, curried;</p>
<p>fun (x, y) -&gt; x + y has type int * int -&gt; int, the single argument is a tuple, so this function can&#8217;t be curried.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrei</title>
		<link>http://danweinreb.org/blog/the-scala-programming-language-my-first-impressions/comment-page-1#comment-247</link>
		<dc:creator>Andrei</dc:creator>
		<pubDate>Fri, 28 Dec 2007 22:24:07 +0000</pubDate>
		<guid isPermaLink="false">http://dlweinreb.wordpress.com/2007/12/25/the-scala-programming-language-my-first-impressions/#comment-247</guid>
		<description>Interesting post and comments. Scala is indeed looking very good, even better now than when I first found it a year or so ago. I&#039;ve got some further comments.

Regarding purity, it depends on how we define it, of course. I believe that Odersky is well aware that ML is not &quot;purely functional&quot; in the sense of being &quot;referentially transparent&quot;, because it allows functions with &quot;hidden&quot; side-effects that aren&#039;t transparent. But I don&#039;t think ML was ever conceived as a multi-paradigm language (not the original ML, at least; OCaml is another matter). ML is primarily functional, with side-effects allowed for pragmatic reasons, but a side-effects-free programming style is preferred.

As for differences with python, there are many. I, and many others that have worked with scala for some time, think of it like a mix of Java and Haskell. Scala is statically-typed with type inference, favors a functional style, runs in the Java Virtual Machine and its type system would appear very strange for a python programming, I guess.</description>
		<content:encoded><![CDATA[<p>Interesting post and comments. Scala is indeed looking very good, even better now than when I first found it a year or so ago. I&#8217;ve got some further comments.</p>
<p>Regarding purity, it depends on how we define it, of course. I believe that Odersky is well aware that ML is not &#8220;purely functional&#8221; in the sense of being &#8220;referentially transparent&#8221;, because it allows functions with &#8220;hidden&#8221; side-effects that aren&#8217;t transparent. But I don&#8217;t think ML was ever conceived as a multi-paradigm language (not the original ML, at least; OCaml is another matter). ML is primarily functional, with side-effects allowed for pragmatic reasons, but a side-effects-free programming style is preferred.</p>
<p>As for differences with python, there are many. I, and many others that have worked with scala for some time, think of it like a mix of Java and Haskell. Scala is statically-typed with type inference, favors a functional style, runs in the Java Virtual Machine and its type system would appear very strange for a python programming, I guess.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Wingo</title>
		<link>http://danweinreb.org/blog/the-scala-programming-language-my-first-impressions/comment-page-1#comment-246</link>
		<dc:creator>Andy Wingo</dc:creator>
		<pubDate>Fri, 28 Dec 2007 15:48:35 +0000</pubDate>
		<guid isPermaLink="false">http://dlweinreb.wordpress.com/2007/12/25/the-scala-programming-language-my-first-impressions/#comment-246</guid>
		<description>You write:

&lt;blockquote&gt;
Also, these days it’s faster to make new objects and allow them to be efficiently GC’ed, than incur the GC overhead that results when you mutate an existing object (interesting point!).
&lt;/blockquote&gt;

What is the GC overhead from mutation? Perhaps you refer to the synchronization overhead? Apologies for the ignorant question.

Andy</description>
		<content:encoded><![CDATA[<p>You write:</p>
<blockquote><p>
Also, these days it’s faster to make new objects and allow them to be efficiently GC’ed, than incur the GC overhead that results when you mutate an existing object (interesting point!).
</p></blockquote>
<p>What is the GC overhead from mutation? Perhaps you refer to the synchronization overhead? Apologies for the ignorant question.</p>
<p>Andy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Goldman</title>
		<link>http://danweinreb.org/blog/the-scala-programming-language-my-first-impressions/comment-page-1#comment-245</link>
		<dc:creator>Robert Goldman</dc:creator>
		<pubDate>Thu, 27 Dec 2007 03:37:18 +0000</pubDate>
		<guid isPermaLink="false">http://dlweinreb.wordpress.com/2007/12/25/the-scala-programming-language-my-first-impressions/#comment-245</guid>
		<description>ML is definitely not a pure functional language.  In fact it&#039;s very clear that it intends to be a multiple-paradigm language.  To be honest, the hair of supporting a primarily functional and strictly-typed language (with type inference), has always kept me from quite coming to grips with it.  I&#039;ve been using Lisp too long; I was on the plane teaching myself Ocaml (a variant), and I kept finding myself thinking, &quot;yuck! syntax!&quot;  I think this actually has to do with my discomfort about the particular decisions they made in choosing syntax for pattern-matching and generic typing, and doing all that horrible currying....  I don&#039;t know why they think they&#039;re doing me a favor by turning my n-ary function into a curried mess of functions that return functions.  I mean, I know it could be down there, but I wish they&#039;d stop typing it at me!</description>
		<content:encoded><![CDATA[<p>ML is definitely not a pure functional language.  In fact it&#8217;s very clear that it intends to be a multiple-paradigm language.  To be honest, the hair of supporting a primarily functional and strictly-typed language (with type inference), has always kept me from quite coming to grips with it.  I&#8217;ve been using Lisp too long; I was on the plane teaching myself Ocaml (a variant), and I kept finding myself thinking, &#8220;yuck! syntax!&#8221;  I think this actually has to do with my discomfort about the particular decisions they made in choosing syntax for pattern-matching and generic typing, and doing all that horrible currying&#8230;.  I don&#8217;t know why they think they&#8217;re doing me a favor by turning my n-ary function into a curried mess of functions that return functions.  I mean, I know it could be down there, but I wish they&#8217;d stop typing it at me!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

