4 ms·
I'll concede that Python has more nuanced bits of complexity exposed, but I suspect a willingness to break compatibility for the sake of performance would benef
by brrrrrm 4y ago
I'll concede that Python has more nuanced bits of complexity exposed, but I suspect a willingness to break compatibility for the sake of performance would benefit the language a lot more than it would hurt it. I personally hope the hacker mentality and the immensely perf-driven nature of JavaScript is one day adopted by Python.
For those following, I want to make it clear that the "bits" being discussed are extremely nuanced and won't get in the way of doing obviously useful things in JavaScript.
Here's how you create a JS Object from C using Node-API: https://nodejs.org/api/n-api.html#napi_create_object https://nodejs.org/api/n-api.html#napi_create_object
It conforms to ECMAScript 6.1.7 Object Types and is very much the same internal representation used by the VM.
Here's how one might tickle the internal representation used by Node.js (V8 in this case) to change the value of the underlying property of a JavaScript object from C: https://nodejs.org/api/n-api.html#napi_set_element https://nodejs.org/api/n-api.html#napi_set_element
- cogman10 4y ago> but I suspect a willingness to break compatibility for the sake of performance would benefit the language a lot more than it would hurt it. That's already happen in the form of graalpy and pypy. The community has voted and they want compatibility more than they want performance.
- HenriTEL 4y ago> I suspect a willingness to break compatibility for the sake of performance would benefit the language a lot more than it would hurt it It took a long time for the community to recover from the python3 incompatibility with python2. I don't think we are ready for another round.