News for hackers. Stuff that matters.
Re:Python vs Clojure by dreish on Wednesday October 14, 2009 @05:46PM (#882216)
I agree for the most part, but incidentally you would never (def x 1) and then (def x 5) in a running program -- you would use an atom, ref, or var instead. Redefinition of a symbol is permitted so you don't have to quit and restart your REPL every time you rewrite a function.

A more meaningful objection is that you can shadow a local with a different local in Clojure, like this:

  (let [a (some-calculation)
        b (something-else)
        a (some-function-of a b)]
    a)
which is essentially what is being done in the Python code.

I don't think there are many strong arguments to make in favor of Clojure over Python other than concurrency and macros, and maybe the immutable hashes.

Re:Python vs Clojure by bretthoerner on Wednesday October 14, 2009 @08:19PM (#882443)
> you would never (def x 1) and then (def x 5) in a running program

Right, I understand. It was the way the author stated 'x never changes' that made me believe he doesn't understand the difference between binding a name and changing a value.