Hacker News new | ask | show | jobs
by gbuk2013 12 days ago
Sure but that runtime is much more general purpose - JS runtimes are focused on network apps. For example you can write an app like Calibre in Python and QT and it is much lighter than writing something with JS and Electron.

Python is easier to interface with C/C++ libs.

2 comments

The async loop does not automatically make it "focused on network apps". Most apps I work with in Python also run on an async runtime.
It’s not the async loop - it’s interfacing with the system. JS is designed to run in a sandbox and the only way out in say Node.js is to write C++ addons.

For example you don’t get to see TCP headers with Node out of the box and you can’t craft packets, whereas you can in Python.

Yeah, I've thought about this since I do prefer JS as a language... Always thought the main advantage of Python was interaction with C libs. Which is also why CPython was the only serious option for an interpreter, even though things like PyPy were faster.