kristianlm <krist...@adellica.com> 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 exposure to Scheme:
`def` in Clojure is always explicitly namespace-scoped.  What it does is
create a var with a name and intern it into the namespace with that
name, not introduce a name in the current lexical scope.  Nested `def`s
are thus very rarely going to be what one actually want, and the
behavior you’re seeing is exactly what one would expect.

-Marshall

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to