23 ms·
I'm wondering: Was the technique of compiling from C++ to JS primarily for code reuse? I always perceived the ability to code in something else besides C++ as o
by pmr_ 14y ago
I'm wondering: Was the technique of compiling from C++ to JS primarily for code reuse? I always perceived the ability to code in something else besides C++ as one of the main advantages of the whole "Games on the Web" thing.
- azakai 14y agoCode reuse was a major reason, yeah. It was much, much easier to compile a full open source game engine (that was worked on for many years!), instead of writing a new one from scratch. Another benefit is C++ compiled to JS tends to be faster than handwritten JS, because it avoid things like GC and property accesses and focuses on things JS engines can easily do fast, like typed array accesses.