jazzdotdev / jazz

The Scripting Engine that Combines Speed, Safety, and Simplicity
Apache License 2.0
146 stars 11 forks source link

Make Lua optional #233

Open naturallymitchell opened 5 years ago

naturallymitchell commented 5 years ago

With conditional compilation of Lua we could open the door to other scripting languages.

Arnaz87 commented 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.

naturallymitchell commented 5 years ago

rename most variables lua.anything to env.anything or, at worst, torchbear-env.anything

naturallymitchell commented 5 years ago

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.

naturallymitchell commented 4 years ago

We can completely replace the Lua C-based interpreter with Rust-based Mun.