Comment by giraffe_lady
3 years ago
Lua is a better integrated language simply because that path is intended by its developers and directly documented, and its runtime is designed to be easy to couple to C. But nothing about its semantics make it better for that task than javascript. They are extremely similar except lua doesn't have stuff you would almost always want like basic string manipulation tools, regex, any array operations more sophisticated than loop.
You can argue you don't need those things, but their lack isn't a feature either. If you're not coupling to C's memory model or if for some reason someone has already done the work of building and debugging the integration... you gain nothing by using lua over js.
I've done professional work in lua and it's highly overrated imo. For integrated languages Tcl or janet is a better choice, unless your use case is extremely extremely simple and then forth is a better choice. The only time I would choose lua is if I'm integrating with C, the integration language tasks are very simple but also requires coroutines. Lua's coroutines are genuinely good.
No comments yet
Contribute on Hacker News ↗