Hacker News new | ask | show | jobs
by vasquque 4110 days ago
Why do programmers databases with JavaScript? Lua is more embedded language than JavaScript. http://www.aerospike.com/ http://redis.io http://tarantool.org use LUA and it more powerful and easy to use as procedures.
4 comments

> JavaScript for all: no language zoo, you can use one language from your browser to your back-end

Javascript is the only language native to the browser.

Yep. I'm afraid if the operating system will write web developers in JavaScript.
Lua is a great language, but JavaScript has become something of a "lingua franca" for web development. ArangoDB's API is based on HTTP and JSON, so JavaScript was an obvious choice.
Lua is a nicer language, but the sheer number of developers who are familiar with JavaScript gives it a huge edge. I suspect that's the driving reason.
On the other hand, Lua is much easier to embed into programs. And it is used a lot in games. If I remember correctly, Redis is also using Lua for scripting.
I am surprised that nobody mentions the great performance of Google's V8 engine here...
From what I've heard the author of LuaJIT contributed a lot of performance improvements to V8.

LuaJIT is a blessing and a curse. It's magnitudes faster than the standard interpreter but on the other hand it's version is lagging behind which means a lot of people won't benefit from the latest lua version

And the constant performance improvements over the last years, that are the result of the ongoing race for better performance between the browser vendors.