2 ms·
Redis only uses Lua because Redis is written in C, and Lua is dynamic but has a good JIT compiler. For software written in JS, it would be natural to use anoth
by nine_k 4y ago
Redis only uses Lua because Redis is written in C, and Lua is dynamic but has a good JIT compiler.
For software written in JS, it would be natural to use another dynamic language with a good JIT compiler, namely JS again.
I could see how introducing Lua might make sense if KV.js decided to be a faithful reimplementation of Redis's interface and (parts of) semantics, only in JS. Then dropping it in as a compatible replacement might be easier if Lua were supported, like in the original Redis.