Closed ctp52 closed 2 years ago
I was misled on this because it works with luajit, which is basically lua 5.1, but apparently luajit backported some 5.2 extensions, including goto.
I'll keep this open because it might be worth rewriting to avoid the 'goto'. I didn't realize that debian stable still has lua 5.1.
Edgar Dijkstra's article from ACM in 1968 titled "Go To Statement Considered Harmful":
https://homepages.cwi.nl/~storm/teaching/reader/Dijkstra68.pdf
Yeah, I know. But this sort of use actually simplifies the code, as you can see from the changes I made to restore Lua 5.1 compatibility. (And we now test with all lua versions 5.1-5.4 and luajit on CI.)
The statement in README.md:
needs correcting to range over 5.2-5.4 as demonstrated by the Debian Linux version 11 lua package installing version 5.1.5 and an error is reported in djot/block.lua:
A new installation of lua version 5.4.4 behaves as expected.