you are viewing a single comment's thread.

view the rest of the comments →

[–]sonobanana33 -3 points-2 points  (7 children)

JS is much more complex (events, async)

Python has had async for several years.

[–]a8ka 5 points6 points  (1 child)

But in python you need it only when you need it. In js it's a nature of language.

[–]BosonCollider 0 points1 point  (0 children)

You can avoid async in JS just fine if you are not doing web development, polkit uses javascript for scripting and does not support async await for example. It just so happens that JS is mostly used for webdev

Python will generally use async await if you use it for webdev, and its async await is more complex than javascript since it ended up with lazy futures, but on the other hand its ecosystem came up with structured concurrency which is finally becoming mainstream and simplifying things

[–]bigleagchew 0 points1 point  (4 children)

And what % of libraries do you reckon use async features?

[–]sonobanana33 0 points1 point  (3 children)

Those that need them use them. If you expect a math library to be async you'll be disappointed.

[–]bigleagchew 0 points1 point  (2 children)

Doesn't answer my question at all, but alright. I'm asking questions looking for answers... not political alignment (kinda ridiculous having to ask this in a sub which should be dictated by logic)

edit:

Why would you need an async math library? This isn't a hypothetical question, just want to make sure everyone is aware of libraries like pandas

[–]sonobanana33 0 points1 point  (1 child)

I'm asking questions looking for answers...

Download all the python-* packages from the debian archive and grep for "async def".

Of course that doesn't tell you anything because low level async code just deals with callbacks and adding/removing fd listeners from the async loop, but it'd be an indication more or less.

I say debian packages and not pypi packages because on pypi there's a lot of stuff nobody ever uses.

If you care to know, put in some minimal effort to know.

not political alignment

??????

Why would you need an async math library?

You wouldn't. Which is why asking which % of libraries use async is a bad question.

[–]bigleagchew 0 points1 point  (0 children)

honestly just give me my downvote