Open minds leads to freedom

Communicating my thoughts on software development

Archive for August, 2009

Constructors in Scala

Posted by rnaufal on 26th August 2009

I just came across an interesting post by Stephan Schmidt about constructors in Scala.

It shows how to create constructors with immutable and mutable fields, how to have multiple constructors how to invoke super class constructors. I found it very handy and concise to create a constructor with a private immutable field:

class Foo(private val bar: Bar)

Tags: ,
Posted in Uncategorized | No Comments »