3 ms·
What was your experience with Lua if it worked? What were the disadvantages that kept you looking for other extension languages?
by rainingmonkey 3y ago
What was your experience with Lua if it worked?
What were the disadvantages that kept you looking for other extension languages?
- gabereiser 3y agoAdvantages, Lua is old and simple so implementing it was a breeze. Disadvantage, I kept running into scenarios where oop made more sense and extending an interface. I could have done that through convention, but it’s not for me. I need to “enforce” the interface more than just a try catch. That led me to Python. Which also worked and suited that need for interface contracts but it introduced new problems. How can I enforce memory guards and sandboxing and execute parallel Python contexts? I ran into road blocks and gave Otto a try as it’s written in go, I would have more luck making the necessary changes if I needed a feature.
- donio 3y agoNot the parent but there are several high quality native (meaning no CGO) Lua implementations for Go and it's a great choice if you want an embedded scripting language: https://github.com/yuin/gopher-lua https://github.com/yuin/gopher-lua https://github.com/Shopify/go-lua https://github.com/Shopify/go-lua Unless you specifically need a JVM either of these will be a much more practical and mature choice for embedded scripting. Alternatively if you prefer JS then Otto is a good choice: https://github.com/robertkrimen/otto https://github.com/robertkrimen/otto
- gabereiser 3y agoI used Shopify's go-lua. It was the simplest to integrate. Otto is what I'm on now but with a "lot" of shims to get ES6 classes to work.