DEV Community

Discussion on: Why JavaScript not Python for Web Development?

Collapse
 
narasimha1997 profile image
Narasimha Prasanna HN

Since you are talking about web development, one must not use Python (if not backend rendering). JavaScript is of course De-Facto. So this comparison would have made much sense if it was comparison between JavaScript v/s Rust (Web assembly). Coming to Web servers, I would prefer Python or JavaScript based on the need. For example, if I want to run AI inference I would prefer Python more than JavaScript. If it is just a normal web server which just does some calls to DB or other backends, I would prefer JavaScript.

JavaScript has much better performance when compared to Python - But this is dependant on the application. If you use JavaScript for image processing for example, it would be not useful, because we have many libraries for Python written in C/C++ that can take good performance gain. If my application is purely IO based, I would happily choose JavaScript (node.js) because we can use Node.js powerful event loop and asynchronous processing.

For frontend I would prefer more of Web assembly if I need high performance.

Collapse
 
atulbhattsystem32 profile image
Atul Bhatt

I made this comparison because college students learn python and then try to do everything with it. Rust is language that's still alien to them. Majority of the college students.

This comparison is done intentionally for those college students trying to do everything with python front frontend, backend to mobile app development.

There are so many things python is good at and I won't deny that. I myself prefee python for scripting because of its easy syntax and plethora of modules and libraries available.
😊