3 ms·
At least for continues and frozen tables, lua already semi offered them via goto and setting __newindex in a metatable. Conditional expression which I imagine
by nmz 3y ago
At least for continues and frozen tables, lua already semi offered them via goto and setting __newindex in a metatable.
Conditional expression which I imagine is ternaries can be done with a constructor and the condition in the field a la {nil,"b"}[cond and 1 or 2]
- kragen 3y agooh thanks! i generally use lua 5.1, because that's what minetest and luajit use, and lua 5.1 doesn't have goto. though i see luajit has added it!