On Mon, Oct 6, 2014 at 1:40 AM, Bill Schottstaedt <[email protected]> wrote:
> Thanks very much for the praise! > > > Is it possible to get this type of backtrace at all? > > Not without slightly rewriting the scheme code -- those are all > tail-calls, so there is nothing in the s7 stack that represents the > call sequence. Ah, I didn't think of that. > Wrap everything in dynamic-winds or the equivalent > to get a C-like stacktrace. > > Thanks! I don't know what you mean, but I'll experiment with dynamic-winds. > > The feature is to give > > warnings for undefined variables and functions. > > Ok -- I'll add a switch for this -- did Guile (Andy Wingo?) > say why they chose to handle these with warnings? > > I don't quite follow. Do you mean why they started to give these warnings in the first place? (I'm 99% sure it's possible to turn off though, but I haven't been reading the mailing list closely for many years). Or why they don't give errors instead? In the latter, errors would be incorrect. For this code: (define (a) (b)) (define (b) 50) guile gives the following output: " scheme@(guile-user)> (define (a) (b)) ;;; <stdin>:2:0: warning: possibly unbound variable `b' scheme@(guile-user)> (define (b) 50) scheme@(guile-user)> " But of course, there is actually nothing wrong with the code, so an error would not be appropriate. But maybe Guile has an option to give error instead, I don't know. (of course, guile doesn't give warnings if the functions are defined in the other order: " scheme@(guile-user)> (define (b) 50) scheme@(guile-user)> (define (a) (b)) scheme@(guile-user)> ")
_______________________________________________ Cmdist mailing list [email protected] http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
