3 ms·
it is not uncommon to patch primitives into your language by having special "__primitive" or something such annotations which can be added to call over a langua
by jlouis 18y ago
it is not uncommon to patch primitives into your language by having special "__primitive" or something such annotations which can be added to call over a language barrier. In this case, you would annotate certain Javascript functions/classes so they refer to their C++ equivalent code.
You gain the advantage that the difference between library code and primitive built-in things blur more so one function can be implemented as a javascript function (because the compiler already produces good code for that part), while another function (un-implementable in JS) is C++.