def vs intern

2010-01-31 Thread Gabi
I wonder what is the difference between the two. Is there a difference? I want do define/intern functions at runtime. Which should I use ? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com No

Re: def vs. intern

2009-01-28 Thread Matt Moriarity
yes, that is why. On Jan 27, 9:55 am, Mark Volkmann wrote: > On Mon, Jan 26, 2009 at 8:19 PM, James Reeves > > > > wrote: > > > On Jan 27, 2:08 am, Mark Volkmann wrote: > >> Let's see if I've got this straight. > > >> (def foo 1) creates a Var in the default namespace with a value of 1. > > >>

Re: def vs. intern

2009-01-27 Thread Mark Volkmann
On Mon, Jan 26, 2009 at 8:19 PM, James Reeves wrote: > > On Jan 27, 2:08 am, Mark Volkmann wrote: >> Let's see if I've got this straight. >> >> (def foo 1) creates a Var in the default namespace with a value of 1. >> >> (create-ns 'com.ociweb.demo) ; creates a new namespace >> (intern 'com.ociwe

Re: def vs. intern

2009-01-26 Thread James Reeves
On Jan 27, 2:08 am, Mark Volkmann wrote: > Let's see if I've got this straight. > > (def foo 1) creates a Var in the default namespace with a value of 1. > > (create-ns 'com.ociweb.demo) ; creates a new namespace > (intern 'com.ociweb.demo foo 2) ; creates another Var named foo, but > it's not in

def vs. intern

2009-01-26 Thread Mark Volkmann
Let's see if I've got this straight. (def foo 1) creates a Var in the default namespace with a value of 1. (create-ns 'com.ociweb.demo) ; creates a new namespace (intern 'com.ociweb.demo foo 2) ; creates another Var named foo, but it's not in the default namespace But the last line gives a java