[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Why I leave Lua (Was: Re: [ANN] Lua 5.3.0 (work3) now available)
- From: Coroutines <coroutines@...>
- Date: Wed, 9 Jul 2014 19:25:50 -0700
On Wed, Jul 9, 2014 at 7:19 PM, Hao Wu <wuhao.wise@gmail.com> wrote:
> I am not sure about any particular case to intend overflowing the call
> stack, but here is to threshold the recursive looking up to 100 or something
> - note that __index can be a function that does anything, a.k.a. unavoidable
> infinite loop.
A stack overflow is something I might want to catch within pcall(), is
what I am saying. Someone a day ago in #lua told me that there is a
limit on the recursion depth of C function calls, or something like
it. I wasn't happy about that because I was trying to port something
I saw in javascript so I could find the maximum recursion depth before
stack overflow. I wouldn't do it with __index, but infinite loops are
sometimes desired is all I am saying. I wouldn't limit something
because I think others might not want that ~