lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




On 2018-01-25 11:04 PM, Sean Conner wrote:
It was thus said that the Great Paige DePol once stated:
Soni They/Them L. <fakedme@gmail.com> wrote:

The main difference between Lua 5.3 and "Lua 5.4" is that Lua 5.3 does TCO
of varargs, I think. This isn't (yet) possible with "Lua 5.4" (but it'd be
nice if it was).
What do you mean by TCO? Also why quote "Lua 5.4" like that, the GitHub
source code identifies itself as Lua 5.4 now.
   Tail call optimization---basically a form of GOTO.

   -spc



if statements are a form of GOTO.

loops are a form of GOTO.

function calls are a form of GOTO (+ stack management).

*returns* are a form of GOTO.

TCO is a function call with optimized/"smart" stack management. this can include e.g. realloc'ing an array (5.3 varargs) instead of GC.

--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.