News for hackers. Stuff that matters.
Re:Clojure & Python, Side by Side by tdfx on Saturday November 19, 2011 @04:10PM (#3256255)
Lets you target the JVM without writing Java, among other things.
Re:Clojure & Python, Side by Side by rglullis on Saturday November 19, 2011 @04:12PM (#3256258)
Re:Clojure & Python, Side by Side by moonboots on Saturday November 19, 2011 @04:24PM (#3256286)
Unfortunately, Jython is at 2.5.2, 3.5 years behind cpython.
Re:Clojure & Python, Side by Side by rglullis on Saturday November 19, 2011 @04:45PM (#3256353)
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 that was relatively painless.

Re:Clojure & Python, Side by Side by bretthoerner on Saturday November 19, 2011 @05:17PM (#3256452)
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.

Re:Clojure & Python, Side by Side by vorg on Saturday November 19, 2011 @05:58PM (#3256569)
None of you three mentioned Python 3.0 to 3.2.
Re:Clojure & Python, Side by Side by bretthoerner on Sunday November 20, 2011 @08:41AM (#3258070)
That's because they don't matter to anyone.
Re:Clojure & Python, Side by Side by vorg on Monday November 21, 2011 @12:56AM (#3260173)
It seems common that people don't upgrade to a breaking version of a programming language based on name or distro channel alone. Hence the slow uptake of Python 3 and Perl 6.
Re:Clojure & Python, Side by Side by tdfx on Saturday November 19, 2011 @04:15PM (#3256261)
This occurred to me after I finished writing that post.
Re:Clojure & Python, Side by Side by skylan_q on Saturday November 19, 2011 @04:25PM (#3256288)
Yea... I'm still confused as to the whole point of pure/near-pure functional programming if we're not getting better code density/more productivity against other languages which I (and some others) find easier to work with.

I guess all I'm saying is "convince me!" :) I'm all ears.

Re:Clojure & Python, Side by Side by jkkramer on Saturday November 19, 2011 @04:52PM (#3256372)
In short: FP makes programs easier to reason about and understand by using trustworthy abstractions. Here are some resources to check out, which explain better than I could:

Why Functional Programming Matters: http://www.cs.utexas.edu/~shmat/courses/cs345/whyfp.pdf

Out of the Tar Pit: http://web.mac.com/ben_moseley/frp/paper-v1_01.pdf

Simple Made Easy: http://www.infoq.com/presentations/Simple-Made-Easy

Re:Clojure & Python, Side by Side by spacemanaki on Saturday November 19, 2011 @05:08PM (#3256417)
The big differences between Clojure and Python are probably twofold: it's a Lisp, and it focuses on getting concurrency right. We've had Lisps for a while, and Python only really lacks Lisp macros, so let's think about the concurrency stuff...

Clojure's design goals combine some deep ideas about identity, state and time together and includes data structures and a concurrency API that supports these goals. It's going to be hard for anyone to just convince you in a comment like this, and even if they could, I'm not the one to do it as I'm a Clojure noob.

You should read this essay http://clojure.org/state and watch this talk http://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hic....

I think you will find that Clojure is pretty interesting, even if you don't start using it right away. I apologize for just throwing you links, but I can't do it justice, and Rich Hickey is a great lecturer, so you'll get more from his stuff.

Re:Clojure & Python, Side by Side by rayiner on Saturday November 19, 2011 @04:46PM (#3256357)
I mean the answer is that the Python example is nearly purely functional to begin with. It uses list comprehensions heavily and I couldn't find any mutating assignments in a quick glance of the code. Which is not surprising, since it was written by Peter Norvig, who wrote a very popular Lisp book.

I think what Clojure can offer on top of that is macros, the advantages of which are really only evident on bigger or harder problems.

Re:Clojure & Python, Side by Side by dkersten on Saturday November 19, 2011 @05:17PM (#3256448)
getting better code density/more productivity

Its not so much about brevity or productivity as it is about correctness. Functional programming and immutable data makes it easier to reason about code and to prevent bugs/errors, especially in the context of concurrent/multicore code.

Re:Clojure & Python, Side by Side by icandoitbetter on Saturday November 19, 2011 @04:55PM (#3256376)
You actually get better code density with Clojure, for large enough programs. And a WAY better code density when you try to do multithreading.
Re:Clojure & Python, Side by Side by Luyt on Saturday November 19, 2011 @04:27PM (#3256298)
How does Clojure's Java interop compare to Jython's?
Re:Clojure & Python, Side by Side by lucian1900 on Sunday November 20, 2011 @07:31AM (#3257961)
In some ways it's nicer (clojure fns are java Callables), in some ways it's less nice (harder to extend a class).