dibyendumajumdar/ravi

what happens when Lua 5.4 is out?

Opened this issue · 4 comments

evnix commented

will it try to be compatible with the latest version of Lua or will it go on its own way like LuaJIT?

Hi - that's a good question. I would like Ravi to be compatible with Lua 5.4. But if Lua 5.4 breaks compatibility with 5.3 or earlier (it seems like Lua team don't care about backward compatibility ... lets see how much of a break they go for) then I will have to diverge as I don't intend breaking backward compatibility.

I am not going to merge all the internal byte code changes - only user visible ones. I have a branch with the new GC merged already but since no test harness is available yet it is difficult to validate. I will look at merging other user visible changes provided this doesn't break backward compatibility.

Merging the changes is a lot of effort though ... but hopefully I have done the major work already (GC and upvalues implementation)

Perhaps the new scoped variable (toclose) is the most important feature that I need to merge. I am waiting for a final implementation / design

Update: I am not convinced that the Lua 5.4 approach for toclose variables is the right way to go for Lua. For one only 5.4 libraries will be able to make use of it. So all existing code cannot benefit. It is also more complex than it needs to be. My approach will most likely be to implement #163 instead. This is simpler and can benefit all existing code.

The generational GC is also a question mark, as it introduces a lot of complexity that is moreover not battle tested. Once we have deterministic cleanup the usefulness of generational GC is also doubtful in my opinion.

Happy to hear other views on these topics.

Following have been back-ported from Lua 5.4|:

  • Generational GC
  • New random number generator
  • Change in automatic conversion of strings to numbers in expressions.