Tail calls
It is recommended to make use of Lua's tail call optimization when using plato.go and plato.selection functions, as this will prevent situations in which long chains of entry points can overflow the Lua call stack. In practical terms, this means that these functions should only be called as part of return statements, i.e.,
return plato.go("name")
and
return plato.selection()
This is especially important in situations where the level of nesting is outside the developer control: for example, if a chain of entry points is cyclic players could theoretically add to the call stack indefinitely by going through the cycle multiple times.
generated by LDoc 1.5.0