score:0

Confused am I: isn't the baked-in case class factory all that you need here, or am I missing something. IOW:

scala> case class Foo(bar:String="ab")
defined class Foo

scala> val f = Foo()
f: Foo = Foo(ab)

scala> f.bar
res2: String = ab

Related Query

More Query from same tag