Live data from Hacker News

Clojure & Python, Side by Side

tin.nu

31–40 of 67 posts

Re: Clojure & Python, Side by Side

#31

Earlier quoted context omitted.

That is certainly a problem. But there are very few language constructs in Python >= 2.6 that are missing in Python 2.5, and the really missing features (e.g, multiprocessing module) have better alternatives in the JVM, or are redundant. You lose some portability, but Jython 2.5 doesn't seem to be that limited in capabilities. Anyways, YMMV. All I got to do once was set my Django application to run on Jython, and tha…

While I'd agree Python 2.5 to 2.7 doesn't bring a swath of language features with it... it's a good sign of Jython's slowing/sluggish growth/development. Personally, I want to use a language implementation that will be around and (well!) supported for many years.

None of you three mentioned Python 3.0 to 3.2.

Re: Clojure & Python, Side by Side

#32
post #4

This is pretty cool. I know python well enough to hack my way around it. I'm probably missing something, but now I have to ask: what would be the point in me learning clojure?

This post has been on Hacker News multiple times. It usually comes up on the weekend when people post a lot of Clojure stuff. If you read the article, it says that the Clojure implementation was meant to mirror Norvig's Python implementation. The clojure code could certainly be written more succinctly. I thing there was another article that did this. Would have to look it up though.

Re: Clojure & Python, Side by Side

#37
post #4

This is pretty cool. I know python well enough to hack my way around it. I'm probably missing something, but now I have to ask: what would be the point in me learning clojure?

Clojure has excellent concurrency support. Clojure has a focus on functional programming, immutable data[1] and the sequence abstraction[2]. Clojure is a Lisp and has most[3] of the super-powerful metaprogramming facilities that you would expect from a Lisp. This means you can, with enough effort, mold the language to suit your needs, even turning it into a completely different language should you wish to do so. Cloj…

"Pure Clojure code is, as far as I can tell, higher performance than pure CPython code."

Not so here; the author mentions that the Python version is faster (in his blog post).

Re: Clojure & Python, Side by Side

#40
post #37

Earlier quoted context omitted.

Clojure has excellent concurrency support. Clojure has a focus on functional programming, immutable data[1] and the sequence abstraction[2]. Clojure is a Lisp and has most[3] of the super-powerful metaprogramming facilities that you would expect from a Lisp. This means you can, with enough effort, mold the language to suit your needs, even turning it into a completely different language should you wish to do so. Cloj…

"Pure Clojure code is, as far as I can tell, higher performance than pure CPython code." Not so here; the author mentions that the Python version is faster (in his blog post).

Adding type hints to the relevant spots in the Clojure code might have helped him in terms of performance.
Post reply on HN