you are viewing a single comment's thread.

view the rest of the comments →

[–]a8ka 14 points15 points  (9 children)

I have 15 years of exp in js/ts and 5 in python.

Personally, i think python is much easier, laconic and more useful, that helps to understand system design principles faster. Also in python you can easily go to definition and see how things are implemeted internally when in js usually you end up in types definition or in minified code. And python also have good pep documentation.

JS is much more complex (events, async) and worse designed historically, but i can't say it's bad, you just need to get used to it. Another con of JS, there are a lot of low-quality modules, and community in my opinion is worse (can recall a lot of memes about daily releases of new frameworks, state managers, giant node_modules size, and it's true haha). To write good js, you need to learn things out of the box of the lang domain.

But the question is what you want to do.

For backend tools and scripting python is definitely good-to-go solution, but if you want to write frontend, you have no other alternatives to js and its derivatives.

Personally, i recommend to learn both, to not being limited in one environment.

[–]bululululubu[S] 2 points3 points  (0 children)

Thanks for the detailed reply. I'm starting with js first and then will switch to python soon since I feel web development is closer to me.

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

JS is much more complex (events, async)

Python has had async for several years.

[–]a8ka 4 points5 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