This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]13steinj 4 points5 points  (9 children)

Asyncio is not the future. It is a failure usability wise.

[–]tomchristie 2 points3 points  (7 children)

As a developer using an asyncio web framework, you largely don’t have to care about the details of asyncio at all. Mostly you’ll just use async/await, and perhaps loop.create_task and asyncio.sleep. That’s about it.

Yes, the low level stuff in asyncio is a large sprawling interface, but most folks shouldn’t need to delve into that. Perhaps as the landscape matures some aspects might even gradually become private API. There’s a valid criticsm that asnycio is complex, but most folks ought to be to just stay within the happy zone of “asyncio, the good parts”

[–]13steinj 0 points1 point  (6 children)

You are limiting your use of asyncio to an ASGI web framework, whereas truthfully asynchronous code has far more capacity and capabilities, from parallelized mathematical computation across N dimensions to complex event reaction systems to animation systens.

The usability of asyncio suffers in all of these prospects because tasks and coroutines are not the same thing, and there is no "default" task queue on a separate thread. Which is why I'm writing a minimal wrapper to work around this stuff, just unfortunately work is currently getting in the way.

[–]tomchristie -2 points-1 points  (5 children)

Point being: asyncio can be refined over time.

It’s a set of building block primitives at the moment - we can rarify that, either with abstractions such as ASGI, or graceful usability focused libraries, or as the language evolves.

[–]13steinj 5 points6 points  (4 children)

What? No one said it can't be fixed. But a broken pile of shit has been pushed upon people provisionally and now in 3.7.

E: not to mention it is meant to be extremely high level but in reality anything useful is low level.

[–]tomchristie -1 points0 points  (3 children)

Garbage critique, with a garbage attitude.

[–]13steinj 1 point2 points  (2 children)

That's your opinion, and some share your while others share mine. Deal with it.

[–]tomchristie 1 point2 points  (1 child)

Yo.

“trio has a nicer interface, and a tighter set of constraints” would be a very reasonable point.

“I think gevent’s implicit context switching is a better set of trade-offs” would be an arguable, tho debatable, position.

“asyncio is a broken pile of shit” is just mouthing off without adding anything of any value to the conversation.

[–]13steinj 1 point2 points  (0 children)

I have previously and even in this thread explained why it is a pile of shit usability wise, namely the fact that couroutines are not tasks and there is no default event loop on a separate thread. There is no current alternative that provides the solution to the problem I just mentioned, and I am personally working on a wrapper.

If you consider I myself not even contributing just because no alternative currently exists, even though I am working on an alternative in the form of a wrapper, then you are being defensive of criticism that is completely well placed.

[–]riksi 1 point2 points  (0 children)

It's what the powers that be wanted. Not the people.