[erlang-questions] feedback on my solutions to programming erlang second edition

Richard A. O'Keefe ok@REDACTED
Tue Aug 18 05:01:34 CEST 2015


On 17/08/2015, at 10:38 pm, Garrett Smith <g@REDACTED> wrote:
> I wonder why stack variables aren't included in stack traces - I've
> never seen that in any language (Richard? :) but it would be
> fantastically useful.

Burroughs MCP: stack *traces* were just a list of lines,
basically, but stack *dumps* showed you details (and since
the B6700 was a tagged machine, it could do a darned good
job of decoding stuff).

The Edinburgh EMAS operating system:  when an IMP (the EMAS
equivalent of C, sort of Algolish) program crashed, you got
a stack dump telling you about variables.  As a user, I was
quite annoyed by this, because of course the internals of a 
program I didn't have the source for were meaningless to me.

Neither of these provided stack traces (or dumps) *to programs*
as a data structure.  It's not clear what a program could *do*
with names and values of variables, considering that the
internal structure of a function can be changed dramatically
while still being the same interface.

In Smalltalk, an exception handler gets full access to
*everything*, because Smalltalk programs have full access
to everything in the stack anyway.  (Start with 'thisContext',
which is the executing frame, and proceed from there.  It's
not in the standard, thankfully.)




More information about the erlang-questions mailing list