Comments on Programming Scalaurn:uuid:0269ee92-b012-32b2-a854-63b461b0527e2009-08-11T20:59:08-07:00 <div>Build Tools <p id="para_sbt_support">The Scala-oriented <span class="emphasis"><em>sbt</em></span> (simple-build-tool), available at <a class="ulink" href="http://code.google.com/p/simple-build-tool/" target="_top">http://code.google.com/p/simple-build-tool/</a>, has some similarities to <span class="emphasis"><em>Buildr</em></span>. It is also compatible with <span class="emphasis"><em>maven</em></span>, but it uses Scala as the language for writing build scripts. It also has built-in support for generating <span class="emphasis"><em>Scaladocs</em></span> and for testing with ScalaTest, Specs, and ScalaCheck.</p> <blockquote><p>A good build tool really helps get into using a language. I have no affiliation with any of the tools out there, but I used to use ant, maven and eclipse and have found sbt to be a remarkably simple yet powerful tool for building. It has really helped speed me into the language. I think it merits a bit more comment here, perhaps the odd example of a few useful commands like: </p> <p>~ test </p> <p>which auto builds and tests every time you save a change to a source file on the file system, or: </p> <p>console </p> <p>which compiles the code then jumps into the scala console to allow you to exercise the codebase by hand. </p> &#8212; stuartroebuck (2009-08-07 02:41:57) </blockquote> </div>urn:uuid:7f717a16-529b-32e7-a728-e72268bd65f3stuartroebuck2009-08-07T02:41:57-07:00Comment on 'Build Tools' <div>Java Library Interoperability <p id="para_however_if_you_inject_depende">However, if you inject dependencies into Scala <code class="literal">objects</code>, you must use setter injection, as you have no way to define constructor parameters and you have no control over the construction process.</p> <blockquote><p>Discussed briefly in the Application Design chapter section on Annotations. Thanks. </p> &#8212; deanwampler (2009-07-12 22:17:27) </blockquote> </div>urn:uuid:3c0846ff-1c8e-39c4-a943-36a943f1123fdeanwampler2009-07-12T22:17:27-07:00Comment on 'Java Library Interoperability' <div>Java Interoperability <p id="para_because_scala_syntax_is_primar">Because Scala syntax is primarily a superset of Java syntax, invoking Java code from Scala is usually straightforward. Going the other direction requires that you understand how some Scala features are encoded in ways that satisfy the JVM specification. We discuss several of the interoperability issues here. <a class="xref" href="apa.html#Spiewak2009a">[Spiewak2009a]</a> and <a class="xref" href="apa.html#Odersky2008">[Odersky2008]</a> provide additional information.</p> <blockquote><p>Thanks for the suggestion. It would be a good topic, but I don't know if we'll have time to cover it before our completion deadline. </p> &#8212; deanwampler (2009-05-29 12:00:42) </blockquote> </div>urn:uuid:b555b3e4-4afe-3eb2-ab23-59d26b764b07deanwampler2009-05-29T12:00:42-07:00Comment on 'Java Interoperability' <div>Other Notable Scala Libraries and Tools <p id="para__scalaz__http_wiki_workingm"><span class="emphasis"><em>Scalaz</em></span> (<a class="ulink" href="http://code.google.com/p/scalaz/" target="_top">http://code.google.com/p/scalaz/</a>) is a library that fills-in gaps in the standard library. Among its features are enhancements to several core Scala types, such as <code class="literal">Boolean</code>, <code class="literal">Unit</code>, <code class="literal">String</code>, and <code class="literal">Option</code>, plus support for functional <span class="emphasis"><em>control</em></span> abstractions, such as <code class="literal">FoldLeft</code>, <code class="literal">FoldRight</code>, <code class="literal">Monad</code>, <span class="emphasis"><em>etc.</em></span> that expand upon what is available in the standard library.</p> <blockquote><p>Thanks for the update. I'll change the link. </p> &#8212; deanwampler (2009-05-29 11:57:39) </blockquote> </div>urn:uuid:4941882f-a3c3-3b6e-8109-c06255c49db7deanwampler2009-05-29T11:57:39-07:00Comment on 'Other Notable Scala Libraries and Tools'