28 Dec 22:31
Re: Scala Object Notation ( SCON? )
martin odersky <martin.odersky <at> epfl.ch>
2007-12-28 21:31:06 GMT
2007-12-28 21:31:06 GMT
>
> class Person{
> String name;
> Integer age;
> }
>
> p = new Person(name: "Andres", age: 29)
>
> A pretty feature to add to Scala.
I (still) don't understand. The above feature already works one by one in Scala:
class Person {
var name: String = _
var age: Int = _
}
val p = new Person{ name = "Andres", age = 29 }
Cheers
-- Martin
RSS Feed