javapythonconcurrencypython-stackless

Python vs. Java -- Which would you pick to do concurrent programming and why?


Also, if not python or java, then would you more generally pick a statically-typed language or a dynamic-type language?


Solution

  • I would choose the JVM over python, primarily because multi-threading in Python is impeded by the Global Interpreter Lock. However, Java is unlikely to be your best when running on the JVM. Clojure or Scala (using actors) are both likely to be better suited to multi-threaded problems.

    If you do choose Java you should consider making use of the java.util.concurrent libraries and avoid multi-threading primitives such as synchronized.