lua-users home
lua-l archive

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


Roberto,

On Fri, Mar 5, 2021, 19:33 Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
Aside from performance reasons, everything in programming could be quite
different :-) But I have not understood your suggestion.  Once we close
the last of them, how to find the next one?

Just to be clear: as Xavier guessed above, I was implying a linear search in the stack (having a total count of to-be-closed vars would help avoid searching part of it). 

The reason for this question is that I'm the unlucky one for whom the extra fields added to stack value structure could matter... so there might be a speed/space tradeoff. I'm not suggesting that you implement that, just asking if it makes sense to you.

Best regards,

-- 
DoubleF