Hello,

On Fri, Sep 4, 2009 at 8:04 AM, Stuart
Sierra<the.stuart.sie...@gmail.com> wrote:
>
> On Sep 3, 9:26 am, Konrad Hinsen <konrad.hin...@fastmail.net> wrote:
>> I don't think so. Python and Clojure are quite different languages.
>> Python is much more dynamic, with variable lookup happening at
>> runtime.
>
> Or, more simply, Python is an interpreter, Clojure is a compiler.  So
> Clojure's "eval" actually compiles the form into Java bytecode, then
> executes it.

I'm not sure this is an interpreter/compiler issue :-) I think it is
more of a resource allocation problem, i.e. what features to add to
Clojure and when.

The code.interact() trick is not specific to Python (or interpreted
languages). I guess it would be implementable in Schemes that provide
the environment as an argument to eval, and some of them are compiled.
Smalltalk also has this, and there is the "Immediate Window" in Visual
Studio which provides a C# REPL at any point on the callstack after
hitting a breakpoint (similar to the Smalltalk debugger). I'm not
familiar with the details of the "Immediate Window" implementation, I
assume they make good use of debugging information.

Anyway, Clojure is great even without this feature - maybe it will be
added at some point in the future. I sure don't mind the extra speed
gained from compiling as much as possible :-)

Thanks,
-- 
Miron Brezuleanu

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