Open naturallymitchell opened 5 years ago
We'd have to make some module in charge of exposing bindings to the languages, and choose, either at runtime or at compilation, which language to use. We'd have then to use only the minimal common features to both languages, which means we have to drop object orientation, iterators, varargs, and other advanced features of lua in the bindings (I think I particularly was the one making the most use of them in the bindings I wrote) and keep only basic functions with basic data types.
rename most variables lua.anything
to env.anything
or, at worst, torchbear-env.anything
Arnaud mentioned that Lua is class + method based, which he reflected in the bindings to match that, but that it is also possible to do it in a generic, functional way. This would support both function setup layouts, when cfg.feature Lua or another language is used.
We can completely replace the Lua C-based interpreter with Rust-based Mun.
With conditional compilation of Lua we could open the door to other scripting languages.