After reading http://clojure.org/rationale and other performance comparisons between Clojure and many languages, I started to think that, apart from ease of use, I shouldn't be coding in Python anymore, but in Clojure instead. Actually, I began to feel irresponsible for not learning Clojure, seeing it's benefits.Does it make sense? Can't I make really efficient use of all cores using a more imperative language like Python, than a Lisp dialect or other functional language? It seems that all the benefits of it come from using immutable data, can't I do just that in Python and have all the benefits?I once started to learn some Common Lisp, read and did almost all the exercises from a book I borrowed from my university library  (I found it to be pretty good, despite it's low popularity on Amazon). But, after a while, I found myself struggling too much to do some simple things. I think there's somethings that are more imperative in their nature, that makes it difficult to model those things in a functional way. So is Python as powerful as Clojure for building applications that take advantage of this new multi-core future?Note that I don't think that using semaphores, lock mechanisms or other similar concurrency mechanism are good alternatives to Clojure's 'automatic' parallelization.
Using Clojure instead of Python for scalability (multi-core) reasons, good idea?
python;clojure;multi core
Can't I make really efficient use of all cores using a more imperative language like Python, than a lisp dialect or other functional language?You definitely can. Depending on the type of the problem (e.g. process clearly separable portions of some big computative task in parallel), it can even be fairly easy. I guess most of the concurrency in the world is still done directly in imperative languages, although the paradigm is shifting towards functional solutions.Python isn't exactly known for its concurrency capabilities, though. An example of a well-established imperative language with excellent concurrency support is Java.It seems that all the benefits of it come from using immutable data, can't I do just that in Python and have all the benefits?The trick with immutable data is that, if you do it with the traditional, simple data structures such as arrays, you'll end up with massive copying and garbage collection, ruining performance. Instead, you want effectively immutable data, which can be implemented with various persistent data structures, as it's done in Clojure under the hood. Such structures could be done in pretty much any language as libraries, but of course direct language support is always nicer.