2 ms·
Code 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
by azakai 14y ago
Code 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.