Re: Question on defrecord

2010-08-11 Thread Stuart Halloway
Hi Shantanu, It depends on exactly what you want when you say "accomplish this". The Clojure "(new Foo)" and "(Foo.)" forms map to Java new. You cannot call Java new generically, from any Java language. You have to have a class already in hand. If you want genericity at compilation time, you co

Re: Question on defrecord

2010-08-11 Thread Chouser
On Wed, Aug 11, 2010 at 1:03 PM, Shantanu Kumar wrote: > I tried to assign a data type to a var and then instantiate it using > the var, but it doesn't seem to work: > > user=> (defrecord X []) > user.X > > user=> (X.) > #:user.X{} > > user=> X > user.X > > user=> (def hey X) > #'user/hey > > user

Re: Question on defrecord

2010-08-11 Thread Krukow
On Aug 11, 7:03 pm, Shantanu Kumar wrote: > I tried to assign a data type to a var and then instantiate it using > the var, but it doesn't seem to work: > > user=> (defrecord X []) > user.X > > user=> (X.) > #:user.X{} > > user=> X > user.X > > user=> (def hey X) > #'user/hey > > user=> (hey.) >