|
|
|
|
|
by brrrrrm
1334 days ago
|
|
what about NAPI? Or deno/buns JITed api? I’ve heard this “no C API” thing echoed by a couple people and it’s baffling. Do folks really think three major JS engines all written in C++ wouldn’t have an interface to interact with C? |
|
Python's C API exposes ref counting and the GIL. It's also very large
JS doesn't have that problem -- more code is written in pure JS, there are no C/C++ bindings in the browser.
There are C/C++ bindings in node.js for v8, but as far as I know they are discouraged and not used very much. The bindings are more "first party" in node.js than third party.
They have issues, but not the same ones as CPython, because the API is very different
JS VMs must be re-entrant because they're embedded in browsers. That was never the case for CPython