4 ms·
"Invariably, some level of logic is implemented in said scripting language, and it becomes a huge bottleneck. " Not necessarily and if it does, then the soluti
by hutzlibu 3y ago
"Invariably, some level of logic is implemented in said scripting language, and it becomes a huge bottleneck. "
Not necessarily and if it does, then the solution is to add that logic into the low level libary. So yes, you need at least one guy who can do this.
- mangodrunk 3y agoAt that point, you’re not really using the high level language.
- BobbyJo 3y agoIf you aren't using the scripting language enough for it to get in the way, you're probably not using it enough for it to make things easier either. Just to be clear, I'm not saying it's impossible to strike the balance where it makes sense. I'm just saying I've yet to see it work, and I would, therefore, not assume such a balance is given by default, or even easy to achieve.
- mangodrunk 3y agoI agree with you. There’s also the additional cost of maintaining more than one language which makes the balance that much harder to do. I could see utility in the high level language to do something with the result if it’s not computationally intensive.
- hedora 3y agoThe theory is that 99% of the code is in the high level language, and 1% is in the low level language. In my experience, that means that 80-90% of the developer effort goes into getting the FFI bindings to not be terrible. (In fairness to things like python, most of my FFI experience is with Java, which is notoriously bad at such things)
- hutzlibu 3y agoHave a look how games work. They are very performance critical - you have to calculate your simulation and draw it 60 times per second. That only works, if you have high performance low level libs. It is very common to mix C++ with lua. So yes, it is about balance, but it is standard procedure by now. And with wasm (or even webGPU) one can do now the same with javascript and the web. Some logic in scripting is fine, but the heavy calculations should be lower level if one is aiming for performance.