Am 10.08.2016 um 19:17 schrieb Sven R. Kunze:
On 09.08.2016 05:23, Nick Coghlan wrote:
On 9 August 2016 at 08:37, Sven R. Kunze <[email protected] 
<mailto:[email protected]>> wrote:

    From what I've heard in the wild, that most if not all pieces of async are 
mirroring existing Python features. So,
    building async basically builds a parallel structure in Python resembling 
Python. Async generators complete the
    picture. Some people (including me) are concerned by this because they feel that 
having two "almost the same
    pieces" is not necessarily a good thing to have. And not necessarily bad 
but it feels like duplicating code all
    over the place especially as existing functions are incompatible with async.


It's a known problem that applies to programming language design in general 
rather than being Python specific:
http://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/


If it's a such well-known **problem**, why does it even exist in Python in the 
first place? ;-)

I don't buy that one couldn't have avoided it.


Lately, I talked to friend of mine about async and his initial reaction was like 
"hmm that reminds me of early
programming days, where you have to explicitly tell the scheduler to get control 
back". He's much older than me, so I
think it was interesting for him to see that history is repeating again.

Up to now there is only one answer to the question "Is `await` in Python3 
Cooperative Multitasking?"

http://stackoverflow.com/questions/38865050/is-await-in-python3-cooperative-multitasking

The user there writes: [about await] That sounds quite like Cooperative 
multitasking to me.

In 1996 I was a student at university and was told that preemptive multitasking 
is better.

Since tools like http://python-rq.org/ can be implemented in Python2.7 I ask 
myself: why change the language?

My opinion: if you want to do parallel processing, use a tool like python-rq or 
celery.

Regards,
  Thomas Güttler



--
Thomas Guettler http://www.thomas-guettler.de/
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to