4 ms·
Why would you want to replace Lua in this space? At least why replace with another dynamically typed, imperative scripting language, but without tail-call optim
by toastal 6y ago
Why would you want to replace Lua in this space? At least why replace with another dynamically typed, imperative scripting language, but without tail-call optimization? What would be the gain?
- mottosso 6y agoI was wondering the same as the parent, and in my case it's library support (e.g. NumPy) and compatibility/familiarity in the space (VFX) where Python is everywhere and Lua is unheard of.
- otterlicious 6y agoIf you want NumPy support in particular you basically have to use CPython. The only other implementation that really supports it is PyPy which is not in any sense more lightweight.
- matt_trentini 6y agoAlthough much smaller in scope than NumPy, MicroPython (and CircuitPython) now have the ulab library which provides similar fast array manipulations: https://github.com/v923z/micropython-ulab https://github.com/v923z/micropython-ulab
- drran 6y agoSo, use Python instead of MicroPython.
- londons_explore 6y ago> Why would you want to replace Lua in this space? The crowd of people who speak Lua is pretty different than those who speak Python. I would guess the Lua crowd to be older, more experienced, but smaller. The Python crowd is much bigger, and includes people who dabble in coding rather than those of us who do it for a living. It depends on the user base of your application, but I can totally see why Python would be a better embedding language for users to use. You build the product for the users after all. In todays world, I'd make some V8 bindings and get users to use javascript, because that's even easier to embed, has a bigger ecosystem via nodejs/npm, and has a probably larger userbase... It's got a nice remote debugger/UI too, which is quite a plus if you're expecting inexperienced users to write plugins/modules for you.
- toastal 6y agoThe Lua crowd includes kids learning to code because they want mods in Minecraft and other games. Sometimes I see Lua suggested a a first language over JavaScript because it's much smaller and has less warts (plenty of warts exist though). Can you even use V8/SpiderMonkey in the same way as LuaJIT?
- pansa2 6y agoI'd prefer to use a language that's more orthodox than Lua, e.g. one with class-based OOP and separate lists & maps, rather than tables-for-everything. I'd also like a language that puts more emphasis on backwards-compatibility than Lua. Sure, everyone complains about the Python 2 => 3 transition, but there have been 3 new major versions of Lua since the release of Python 3.
- toastal 6y agoLua versioning is a really weird thing I'll give you that. I find class-based OOP a point against a language rather than for it, but there's already a huge chunk of languages that compile to/add types to Lua (https://github.com/hengestone/Lua-languages https://github.com/hengestone/Lua-languages), with Wu and Amulet looking intriguing to me.