George Jahad <cloj...@blackbirdsystems.net> writes:

> Every time I stick a println into some Clojure code to debug it, I
> think to myself, "This is Lisp! I should be able to insert a repl
> here!"
>
> The problem is of course that Clojure's eval function doesn't know
> about the surrounding lexical scope. So I started asking myself, what
> is the simplest change I could make to Clojure to support an eval that
> understands that scope? Then I tried to implement it.

Neat idea.

Unless I'm misunderstanding what your modifications do, I've come up
with a simple pure macro version that doesn't require any modifications
to Clojure.  It also works fine in the middle of lets and such and you
can put a call to the (local-bindings) macro anywhere to get a map of
the locals to their symbols.

http://gist.github.com/252421

Cheers,

Alex

-- 
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