[Haskell-cafe] Python's big challenges, Haskell's big advantages?

Manlio Perillo manlio_perillo at libero.it
Wed Sep 17 09:22:54 EDT 2008


Arnar Birgisson ha scritto:
> Hi Manlio and others,
> 
> On Wed, Sep 17, 2008 at 14:58, Manlio Perillo <manlio_perillo at libero.it> wrote:
>>> http://www.heise-online.co.uk/open/Shuttleworth-Python-needs-to-focus-on-future--/news/111534
>>>
>>> "cloud computing, transactional memory and future multicore processors"
>>>
>> Multicore support is already "supported" in Python, if you use
>> multiprocessing, instead of multithreading.
> 
> Well, I'm a huge Python fan myself, but multiprocessing is not really
> a solution as much as it is a workaround. 

The real workaround is probably (and IMHO) multithreading (at least 
preemptive).

> Python as a language has no
> problem with multithreading and multicore support and has all
> primitives to do conventional shared-state parallelism. However, the
> most popular /implementation/ of Python sacrifies this for
> performance, it has nothing to do with the language itself.
> 
> Stackless Python is an interesting implementation of the CSP+channels
> paradigm though. It has been quite successfully used for a few large
> projects.
> 

There is also greenlets for cooperative multithreading (but without the 
scheduler and channels, so you can integrate it in your event loop like 
Twisted).

>> And scalability is not a "real" problem, if you write RESTful web
>> applications.
> 
> Of course scalability is a "real" problem, ask anyone who runs a big
> website. I don't see how RESTful design simply removes that problem.
> 

If you use asynchronous programming and multiprocessing, you *do* solve 
most of the problems.

This is what I do in the wsgi module for Nginx.

> cheers,
> Arnar
> 


Manlio Perillo


More information about the Haskell-Cafe mailing list