Re: Strange behaviour: nested def in proxy method body

2012-12-14 Thread kristianlm
Ah, thanks for your reply, both of you! That's why I got confused: it seemed to work when I didn't use proxy. I'll stop using nested defs for now. But I will miss them: they allow me to evaluate them top-level in the REPL (using C-x C-e in emacs) and play around with them. K. On Thursday, D

Re: Strange behaviour: nested def in proxy method body

2012-12-13 Thread Alan Malloy
On Thursday, December 13, 2012 4:14:23 AM UTC-8, Marshall Bockrath-Vandegrift wrote: > kristianlm > writes: > > > I'm enjoying testing Java code with Clojure and it's been a lot of fun > > so far. Coming from Scheme, the transit is comfortable. However, I > > encountered a big surprise when I

Re: Strange behaviour: nested def in proxy method body

2012-12-13 Thread Marshall Bockrath-Vandegrift
kristianlm writes: > I'm enjoying testing Java code with Clojure and it's been a lot of fun > so far. Coming from Scheme, the transit is comfortable. However, I > encountered a big surprise when I nested def's and used them with a > proxy: This is a common surprise for people with previous expos

Strange behaviour: nested def in proxy method body

2012-12-13 Thread kristianlm
Hello Clojurers! I'm enjoying testing Java code with Clojure and it's been a lot of fun so far. Coming from Scheme, the transit is comfortable. However, I encountered a big surprise when I nested def's and used them with a proxy: (defn new* [] (def i (atom 0)) (proxy [Object] [] (toSt