On 3 Sep 2009, at 14:43, Miron Brezuleanu wrote:

> Is there a way to get the list of symbols bound locally and to access
> their values?

I don't think so. Python and Clojure are quite different languages.  
Python is much more dynamic, with variable lookup happening at  
runtime. In Clojure, only references to global variables are resolved  
at runtime. Everything else, in particular lexical environments, are  
resolved at compile time. Once your code is running, all the local  
symbols are gone.

There are good and bad aspects to both choices, as so often. Python's  
dynamic-to-the-end approach facilitates debugging, Clojure's compile- 
as-much-as-possible attitude yields faster code and better compile- 
time diagnostics.

> .. Or a better way to simulate code.interact() ?

You would probably have to write a complete Clojure interpreter. Given  
Clojure's Lisp-ness, that's less of an effort than for other  
languages, but it's still not a trivial project.

Konrad.


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