There was another meeting of the Bay Area Scala Enthusiasts (BASE) at the Mountain View Googleplex yesterday. Last month we met at the Twitter office in San Francisco. Most people seemed happy with this arrangement, so we'll continue alternating meetings between San Francisco and Mountain View, on the second Tuesday of every month, as always. (See the group of the mailing list for more info and reminders.)
Attendance increased a lot from the last time we met in Mountain View; I counted at least 18 people in the room. Most of them are looking into Scala in their spare time, some are contemplating replacing parts of their Java code base with Scala, and others are thinking about putting Scala code into production.
Bill Venners announced that the Programming in Scala book will be coming back from the printers next week. He also presented some of his recent work on ScalaTest. He showed examples of other testing frameworks in Java (Hamcrest), Ruby (RSpec), and Scala (Specs) that emphasize tests that read almost like English. He asked for input on some prototype work with ScalaTest that moves in this direction.
Dick Wall showed us some Scala code he's been porting from Java. He reports better readability and fewer lines of code by about a factor of five. While porting his code, he's also tried to make it more functional. He recommended the materials for Prof. Cay Horstmann's class at SJSU for people wanting to (re-)learn functional programming with Scala. He's been using the latest Scala plugin for NetBeans and was very happy that it supports code-completion, even when using spaces instead of dots for calling methods.
Two interesting issues came up with Dick's code:
First, he was a bit dismayed at the lack of flexibility of Scala's Enumerations. In Scala, Enumerations are implemented as a library instead of a language feature. It's a credit to the flexibility and power of Scala that you can define something like Enumerations as a library, but the library sometimes doesn't map perfectly to the functionality of Java Enumerations. I suggested he use abstract classes and case objects, which are more flexible than Enumerations.
Second, with the goal of making his code more functional, he'd made all his classes immutable. He was concerned about trying to integrate immutable classes with a persistence framework. Erlang, for example, has Mnesia, but as far as I know Scala doesn't (yet) have a good persistence story for immutable objects. The best I could suggest was the he make his classes mutable and use Hibernate with Scala.
Michael Galpin vented a bit about Scala's constructors and blogged about it later.
Finally, David Pollak, Kaliya Hamlin, and I will be holding the first Lift Workshop in downtown Berkeley, CA on November 22.
Tuesday, November 11, 2008
BASE Meeting #7
Posted by
Jorge Ortiz
Posted at
6:58 PM
Subscribe to:
Post Comments (Atom)
2 comments:
Hello Jorge,
I just added a line to Wikipedia's article on fold (about how it's used in Scala). Can you please verify the correctness?
Yup, that looks right!
Post a Comment