Using an interpreter on old hardware was often to save memory
Re:Using C++ as a scripting language, part 8
by ramesh31 on Saturday July 29, 2023 @03:28PM
(#36923641)
>As an aside, I find the idea of writing game code in unmanaged C++ perplexing.
Re:Using C++ as a scripting language, part 8
by kevingadd on Saturday July 29, 2023 @03:34PM
(#36923706)
"advances in computing power, parallelism, and JIT technology would be more than adequate to accommodate an interpreted scripting language."
While this is true, game consoles + iOS/iPadOS prohibit JIT and in some cases prohibit script interpreters, so people resort to stuff like 'we wrote a compiler for C# that turns it all into C++ source files' in order to pass review and collect Fortnite Money*.
* I'm using Fortnite Money here to represent 'the kind of money you can make if you're willing to sell lootboxes to teens on the App Store'
Add Vlang to that list, as another that can compile to web assembly. In addition to having a C2V translator (and some other languages have similar). A number of safer and easier/convenient options are out there for those that care to look.
As an aside, I find the idea of writing game code in unmanaged C++ perplexing. Even the original Quake, which targeted DOS-era hardware, relied on a scripting language running in a plain vanilla interpreter (no JIT here). In the [current year] I would think advances in computing power, parallelism, and JIT technology would be more than adequate to accommodate an interpreted scripting language.
[1] https://en.wikipedia.org/wiki/LCC_(compiler)#Projects_incorp...