22 Dec 17:00
Re: Scala Object Notation ( SCON? )
Jamie Webb <j <at> jwebb.sygneca.com>
2007-12-22 16:00:11 GMT
2007-12-22 16:00:11 GMT
On 2007-12-22 10:48:53 Andrés Testi wrote:
> 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.
I think your concern is unfounded. Java seems to handle very large
numbers of classes quite happily.
/J
RSS Feed