"Scala is a scalable language that blends functional and imperative programming styles in an object-oriented framework familiar to Java developers. In this discussion with Daniel Steinberg, Bill Venners explains why some experienced Java programmers are unwilling to give up static-type checking, even for the productivity benefits found in dynamic languages like Ruby and Python. He also delves into the particulars of programming with Scala, like what makes it so scalable, how it supports code quality, and where it best fits into your Java development toolkit. Take this opportunity to learn from a master about what's under the hood with Scala. You'll also gain deeper insight into why functional programming is moving from margins to center for many Java developers, and why dynamic languages should not be your only functional programming alternative."
"Scala often gets lumped in with dynamic languages like Groovy and Jython, but in fact it is a very different creature -- a statically typed functional-object hybrid language written for the JVM. In this talk with Andrew Glover, Ted Neward explains the difference between functional and object-oriented languages and what you can naturally do with them. He then discusses some important domains where Java and other purely OO languages simply are not a good fit, including concurrency and database programming -- both areas where Scala really shines. You'll also learn about lift and some of the highlights of Scala syntax, in this discussion with the author of "The busy Java developer's guide to Scala.""
"Artima caught up with Odersky during JavaOne 2008 and asked him to compare Scala's design philosophy from the programmer's view to that of Java. We also asked him to explain Scala's approach to concurrency:"
"This book is the authoritative tutorial on the Scala programming language, co-written by the language's designer, Martin Odersky. This book is now complete, in stock, and ready to ship!"
"The name Scala stands for “scalable language.” The language is so named because it was designed to grow with the demands of its users. You can apply Scala to a wide range of programming tasks, from writing small scripts to building large systems."
"In Italian, Scala means staircase. In this article, we'll take you up twelve steps that will help you start becoming skilled in Scala. The best way to make use of this article is to try each example out with the Scala interpeter or compiler. Step 1 explains how to download and install the Scala distribution."
"Initially in Scalazine, we will be publishing articles derived from a Scala tutorial book being written by Martin Odersky and Lex Spoon. However, once we complete that task, we will be looking for authors for articles. Please stay tuned."
"Given the fact that the same calculator DSL could have been written in plain Java code without having to go to the trouble I did (just evaluate each fragment recursively without building a whole AST and so on), it may seem like this is another case of a language or tool trying to find a problem to solve. But the real power of building a language this way comes when extending or scaling it up to include more features later."
"The Java language has four levels of access: public, private, protected, and package-level access (frustratingly applied by leaving out any keyword). Scala:"
"Other languages have attempted to solve the "nullability" problem in a variety of ways: C++ essentially ignored it for as long as possible before finally deciding that null and zero were different values. The Java language still hasn't fully resolved the issue, but relies on autoboxing ? the automatic conversion of primitive types to their wrapper objects (which themselves weren't introduced until 1.1) ? to carry Java programmers through. Some pattern aficionados suggest that each type should have a corresponding "Null Object," an instance of the type (actually a subtype) that has each of its methods overridden to do nothing ? which turns out in practice to be a lot of work. After C# 1.0 shipped, the C# designers decided to take an entirely different approach to nullability."
"You will start off by examining how you can parse XML with Scala. Like most programming languages, Scala gives you multiple options for parsing XML. These are the same basic ones: InfoSet/DOM based representations, push (SAX) or pull (StAX) events, or data-binding similar to Java Architecture for XML Binding (JAXB.) You will explore the DOM based manipulation, as it demonstrates many of the benefits of Scala's syntax. Before getting into that, you need to figure out what XML you will parse and what you want to do to it. For that you need to come up with a sample application."
"Now that we've looked at some of the core features of the language, can recognize some of Scala's linguistic flexibility, and have witnessed Scala in action creating DSLs, it's time to start reaching out to the environments that real applications use and show how Scala fits. We'll begin this new phase of the series by starting with the heart of most Java? applications: the Servlet API."
"This second article in the Busy Java developer's guide to Scala series has focused on Scala's object facilities, which let you start using Scala without having to dive too deeply into the functional pool. Based on what you've learned so far, you can already start using Scala to reduce your programming workload. Among other things, you can use Scala to produce the very same POJOs needed for other programming environments, such as Spring or Hibernate."
"Programming in Scala is tantalizingly familiar and different at the same time. It's similar in that you get to work with the same core Java objects you've come to know and love over the years, but clearly different in the way you're supposed to think about decomposing a program down into parts. In this first article in the Busy Java developer's guide to Scala, I've given you just a glimpse of what Scala will let you do. There's much more yet to come, but for now, happy functionalizing!"
"Traits offer a powerful mechanism for categorization and definition in Scala, both to define an interface for clients to use, a la traditional Java interfaces, and as a mechanism for behavioral inheritance based on other behaviors defined within the trait. Perhaps what we need is a new inheritance phrase, IN-TERMS-OF, to describe the relationship between a trait and an implementing class."
"Before we can get too deep into Scala's concurrency support, it's a good idea to make sure that you have a good understanding of Java's basic concurrency model because Scala's support for concurrency builds, at some level, on top of the features and functionality provided by the JVM and supporting libraries. Toward that end, the code in Listing 1 contains a basic concurrency problem known as the Producer/Consumer problem (as described in the "Guarded Blocks" section of the Sun Java Tutorial). Note that the Java Tutorial version doesn't use the java.util.concurrent classes in its solution, preferring instead to use the old wait()/notifyAll() methods from java.lang.Object:"
"Like all the cool languages, Scala also supports implementation inheritance (see Resources). In the Java language, a single-implementation-inheritance model allows you to extend base classes and add new methods and fields, and so on. Despite some syntactic changes, Scala's implementation inheritance looks and feels much the same as it does in the Java language. The differences have to do with the ways that Scala fuses object and functional language design, and they're well worth exploring this month."