3 ms·
Off of the top of my head, with varying difficulty * js has UTF-16 strings with the same semantics(compare-by-value, immutable, interned) as lua strings. you c
by alloyed 12y ago
Off of the top of my head, with varying difficulty
* js has UTF-16 strings with the same semantics(compare-by-value, immutable, interned) as lua strings. you could store UTF-16 in normal lua strings, but then you'd need some way of marshalling them for C code that expects const char* values
* JS has a lot of type coercions when doing binary operations, etc. replicating that seems like a source of indirection
* Lua tables have no explicit length, or any way to preallocate, so it's not entirely obvious what Array(len) or a.length = newlen would do