[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Stack traces with tail calls: disabling tail recursion?
- From: Dirk Laurie <dirk.laurie@...>
- Date: Tue, 25 Feb 2014 12:14:05 +0200
2014-02-25 11:51 GMT+02:00 Ico <firstname.lastname@example.org>:
> Are there other people out there who are having issues with tail call stack
> traces, and if so, how dow you handle this in real life debugging?
You could avoid tail calls until the program is debugged.
A tail call arises in this situation:
If you don't know how many values func will return, you're stuck with
the tail call.
Otherwise you can do:
local a,b,c = func(x,y,z)
If there is either exactly one return value or it does not matter
to replace return nothing by return nil, it's easier: