LuaJit 3.0 is shaping up to be a nice update

I’m very fond of quite a few of the extensions especially.

2 Likes

I’m not a huge fan of some of the syntax additions. It feels like they’re trying to turn Lua into a C-like language.

Also, you won’t be able to use a lot of these features if you’re targeting the web. It’s the downside of Defold forever being locked to a 20 year old version of Lua.

Maybe we can just have a transpiler to builtin into the Defold builder.
Like it is done for JS.
Many of these is just syntactic sugar, can be transpiled.

I would like to have ?? coalescing operator, the compound asignment ( a += b), continue/break keywords.
And a ternary operator but maybe an “if else” expression instead of the ?: variant.
I am used to ?: in javascript but it starts to be unreadable when you add levels into it.

These would make us write less code in many places.
And continue/break is really usefull for some algorithms, they are more readable with them I think.

Anyway this is all syntactic sugar

2 Likes