MOO-cows Mailing List Archive

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

Re: callers() and :huh



Seth writes:
> If I type `spaghetti' (a nonmatching verb) I get:
>   --- starting callers() dump ---
>   {#1955, "spaghetti", #2, #1955, #2}
>   --- ending callers() dump ---
> 
> ... which, i think, falsely implies that there exists a wizowned verb
> #1955:spaghetti.  Programmers who crawl up callers() could crash on this
> sort of behavior.  Is this wrong, or is it just incompletely documented?

This is correct, but apparently less well documented than I had thought.  It
has always been the case that the :huh() verb was called with `verb' equal to
the verb-name actually typed on the command line.  As a consequence of this,
you get the callers() result shown in your message.  Note, however, that
programmers who write code to walk the callers() result should already be more
careful in what they assume.  The verbs indicated in that stack listing may no
longer exist, any or all of the verb-location, this, or programmer objects may
not be valid, etc.  The inclusion in 1.8.0 of entries for built-in function
calls in the result of callers() (for which both verb-location and this are
#-1) has already tickled a number of bugs like this in LambdaCore.

	Pavel


Follow-Ups: References:

Home | Subject Index | Thread Index