lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> On Nov 4, 2019, at 5:05 AM, Philippe Verdy <> wrote:
> For now, the #t operator is completely broken. Tables have to be
> segregated in applications between those used as integer-indexed
> sequences (almost only data), and those using hashed dictionnaries
> (notably all objects for their properties).

While I have my issues with the design of the # operator, its NOT completely broken; it behaves exactly as specified by the manual. Why do you claim that tables have to be segregated? And if so, why is this a problem?

> Tables are so universally used in Lua that this part should be
> urgently refactored for efficiency, stability, and predictability.
> Without it, Lua will remain a "toy", used in niche projects, it will
> not compete in the same playground: Python rocks! Javascript rocks
> too! Lua does not. Various projects that initially started with Lua
> integration have renounced and disabled this feature and prefered
> using other scripting engines (most frequently now they use
> Javascript/ECMAscript, often though node.js and jQuery).

You are of course free to choose any of these languages for your projects.

> May be one way to revive Lua would be to have an implementation in
> Javascript (I'm sure it will perform better and more safely than the
> current implementation in C/C++, and Javascript engines are now much
> easier to integrate and offer better integration with many more
> libraries, including with other languages like Python, Perl, SQL,
> PHP)...

Er, seriously? Compiled JavaScript is faster than C? How is the current version of Lua not “safe”? It’s one of the most stable code bases I’ve ever encountered.

> Is there some stable port of Lua in Javascript (excluding external
> LuaC: the standard library of Lua can perfectly be written in
> Javascript with its own standard libary) that we could recommend ? or
> in PHP ? or in Java (for server-side integration, including in
> database engines, GIS applications, UI frameworks like the Android
> SDK, the iOS SDK, or the Windows UWP, or UX components for Mozilla
> browsers ?).

So basically you dont like Lua. Fine, use JavaScript. Or do you want to add everything you like in JavaScript/Python/etc to Lua? In which case it would no longer be Lua. Ever seen a language that tried to be everything to everyone? Think Ada, or PL/1. Is that what you want?