Andrés Testi | 22 Dec 14:48
Picon

Scala Object Notation ( SCON? )

Hello:
Is it possible to instantiate scala objects in a declarative way like
JSON. I think this would be a solution:

val p = new Person{
   name = "Peter"
   age = 20
   friends = Array(
      new Person{
          name = "Gary"
      }
   )

}

But I don't like to create a subclass of Person for a single instance.


Gmane