Comment

Comment by strenholme

LuaJIT handles double, strings, and dictionaries at near C level performance. Also, arrays, but Lua’s data model has dictionaries and arrays be the same data structure. Lua 5.1 (i.e. LuaJIT) only supports double numeric types,[1] and its strings are immutable.

Lua 5.1’s edge over Javascript and Python is that it’s a lot smaller and simpler.

[1] It’s possible to recompile Lua 5.1 to have the numeric data type be an int, but the standard compiles of Lua5.1 only have double precision floats for numbers. Bitwise operators are technically not part of Lua 5.1, but a library to add support is easy and is usually done: Most Lua5.1 forks including LuaJIT and MediaWiki’s version of Lua5.1 have such a library available. Later versions of Lua have both int and float support.

parent strenholme 3 days ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton