> On Jul 14, 2015, at 10:07 AM, Gustavo Massaccesi <[email protected]> wrote: > > About the OPT. I'll try to rewite my sentence: > > If someone decides to adapt the OPT interface to show Racket programs, > I think that it will be necessary to add the support for tail calls. > IIRC tail calls are not supported in Python, so I guess that the OPT > don't show them properly, I guess it keeps all the call stack and when > the inner function finish the return values travel to the top. > > In Racket, the tail calls are more popular, so I think the tail calls > should be explicitly handled in a "OPT for racket". This may be > confusing for beginners, so perhaps it can be a configurable option. > > The main problem is that iterations are usually implemented as tail > calls, so the complete call stack can be very big, so it's confusing > to show them too. (Is it possible to show a few of the first and last > functions calls and hide the 100-ish repeated middle calls?)
Actually, if I recall the OPT interface correctly, tail calls would happen “automatically.” Specifically, OPT is an off-line display tool. It accepts a list of steps, and displays them. The natural notion of a “stack trace” for the stepper would in fact include only those context frames in non-tail position. In fact, the hard part would probably be in *breaking* tail-calling. John -- You received this message because you are subscribed to the Google Groups "Racket Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-dev/a6af17ba-ab8a-48cc-8abc-1fde7dd6ba2f%40mtasv.net. For more options, visit https://groups.google.com/d/optout.
