121
Points
72
Comments
phreddypharkus
Author

Top Comments

HexDecOctBinJun 25
It might have been better to publicly document and stabilise the LuaJIT bytecode, which would allow people to then come up with whatever syntax they wanted in their own custom frontends.
ArdrenJun 25
> For compatibility with other computer languages, the following classic Lua operators can be written in a more customary syntax:

Why though? What does changing `and` to `&&` actually achieve? Were people confused?

Changing the syntax seems very surface level. It's not actually fixing any problems, just making Lua no longer look like Lua. It's not going to help anyone write/learn Lua. It will make everything more complicated as there are now two ways to do everything.

This feels like adding braces to Python because you don't like indenting your code.

mingodadJun 25
For others interested in alternative syntax to the Lua VM/API sometime ago I've created LJS https://github.com/mingodad/ljs and also https://github.com/mingodad/ljsjit, I've also included an utility lua2ljs program based on the Lemon parser and re2c that convert Lua scripts to LJS with line by line synchronization https://github.com/mingodad/ljs/tree/master/lua2ljs, to test it I've also translated a few non trivial projects (https://github.com/mingodad/ZeroBraneStudioLJS , https://github.com/mingodad/raptorjit-ljs, https://github.com/mingodad/snabb-ljs, https://github.com/mingodad/premake-core/tree/ljs, https://github.com/mingodad/CorsixTH-ljs).

I'm proud of it and thankfull to the Lua/Luajit projects.

HeliodexJun 25
A comment <https://github.com/LuaJIT/LuaJIT/issues/1475#issuecomment-47...> has already been made on the issue regarding the ternary operator, recommending `if x then y else z` over `x ? y : z`. This is exactly how it's done with if-then-else expressions in Luau <https://luau.org/syntax/#if-then-else-expressions>, another language compatible with Lua, and makes it a ton easier to nest (especially with elseif) and I believe still easier to read than `y if x else z`.
ianm218Jun 25
Tangently related but I’ve been deep in Lua recently working on a rust implementation that supports Lua 5.1-5.5 in one Rust Binary https://github.com/ianm199/omnilua.

My ultimate goal was to support LuaJIT in Rust as well but this does not make it easier.

3eb7988a1663Jun 25
Never will I understand ternary operators. As soon as you introduce it, some chuckle heads want to use them everywhere. Worse if the syntax allows nested ternarys. I guess it keeps the language open for code golfing, but it otherwise seems like redundant syntax that at best saves a few characters.
pansa2Jun 25
So is LuaJIT resuming active development after a decade or so of only maintenance? Great!

A lot of these changes make sense (although some of them are a bit too TIMTOWTDI for my taste) - but perhaps LuaJIT 3 would benefit from a change of name as well? Certainly with all these changes, it would be more like a separate language than merely a JIT-compiled version of Lua.

Visit the Original Link

Read the full content on github.com

Source
github.com
Author
phreddypharkus
Posted
June 25, 2026 at 12:41 AM


More Top Stories

hl2.slqnt.dev Jun 25
Half-Life 2 in a Browser
50 commentsby panza
Details
reuters.com Jun 24
Anthropic says Alibaba illicitly extracted Claude AI model capabilities
274467 commentsby htrp
Details
techcrunch.com Jun 24
OpenAI unveils its first custom chip, built by Broadcom
646368 commentsby jamdesk
Details
blog.cloudflare.com Jun 25
Cloudflare launched self-managed OAuth for all
9934 commentsby terryds
Details
markdy.com Jun 23
Markdy: Like Mermaid Diagrams, but for Motion
70 commentsby surprisetalk
Details
blog.jim-nielsen.com Jun 24
Blogging can just be stating the obvious
16559 commentsby Curiositry
Details
👋 Need help with code?