3 ms·
Why not allow for C extensions to Javascript, and create a compiler capable of easy generation of these extensions with optional typing? An example of this wou
by true_religion 15y ago
Why not allow for C extensions to Javascript, and create a compiler capable of easy generation of these extensions with optional typing?
An example of this would be Cython for Python, which lets you get to C speed within 1 to 5% slow down due to interfacing with Python, and it has you write in a Pythonic dialect of C/C++.
- william42 15y agoBecause, all else being equal, writing your code in one language is better than writing your code in two languages.
- chromatic 15y agoWhy not allow for C extensions to Javascript... Because that's a terrible, stop-gap optimization strategy. You can't JIT over the FFI boundary without some heroic API, and distributing compiled/compilable code is quite a hassle.