Viktor Klang | 22 Dec 17:19
Picon

Re: Scala Object Notation ( SCON? )



On Dec 22, 2007 5:00 PM, Jamie Webb <j <at> jwebb.sygneca.com> wrote:
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.

True, but don't feed it C++ classes. It will crap out and never do it's homework.
 

/J



--
_____________________________________
/                                                                 \
       /lift/ committer ( www.liftweb.net)
     SGS member (Scala Group Sweden)
 SEJUG member (Swedish Java User Group)
           Coffee drinker (Skånerost)
\_____________________________________/

Gmane