Some documentation updates for Lua 5.5 - #1159
Conversation
|
Thanks! This is much appreciated! Perhaps a "non-difference" that might be worth mentioning in the documentation is that Teal does allow modifiying the |
Where would be a suitable place for this? https://github.com/teal-language/tl/blob/main/docs/src/teal_standard_library_and_lua_compatibility.md? Also, if this is the desired behavior in Teal code, I think that when the target is 5.5 (or any target that should be compatible with 5.5) the following transformation should be used to avoid a crash ( for i = 1, 5 do
i = i + 1
print(i)
endShould become: for i = 1, 5 do local i = i
i = i + 1
print(i)
end(Deserves a new issue if you agree) |
|
@bjornbm the compiler already does this :) |
|
@hishamhm I believe I am seeing the numeric for exception reported as a one of the incidental observations in #1158:
I tried with an “pairs”-for and then the a local copy of the key is indeed assigned if the target is 5.4 or 5.5. So it seems the numeric for case was forgotten. |
| end | ||
| ``` | ||
|
|
||
| Note, however, that named vararg tables will not be read-only when targeting Lua <5.5. |
There was a problem hiding this comment.
Let's not document this line here. Instead, let's open an issue to get this fixed.
There was a problem hiding this comment.
Note removed. We have #1160 for this since yesterday.
Mainly update to parts of the documentation to reflect that Lua 5.5 is a compiler target. Rather low hanging fruit I will admit.
Someone should confirm that “The options
5.4and5.5are equivalent to5.3, but also allow using the<close>variable annotation.” (i.e.,
5.5does not introduce other changes that deserve mention. I admit I did not dig deep.)