lua-users home
lua-l archive

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


We delayed the introduction of tail calls in Lua for a long time,
exactly because of this debugging problem. We could find no perfect
solution, so the current implementation is a compromise between easy of
use and easy of debugging.

I don't like much the idea of a "compilation mode" that would affect
the way tail calls are compiled. Old timers may recall the old
"$debug" directive (versions <= 3.2) and all the problems related to
it. Maybe we could solve all those problems, but it was a relief when
we got rid of "$debug".

I agree that when we are thinking about tail calls it may be better to
avoid this trick with the debug information. But when we are not (a
quite frequent case, at least for me), we can get quite confused when
some functions simply disapear from the traceback.

Of course, we may think about that particular problem with the base
frame.  Maybe that qualifies as a "bug"?

-- Roberto