[Self-interest] Block Question

Jecel Assumpcao Jr jecel at merlintec.com
Thu Nov 11 04:19:05 UTC 2021


Luke McNeil wrote on Wed, 10 Nov 2021 22:29:41 -0500
> I am still specifically confused on cases like this, however - "(| x = [2] |) x value".
> This case throws the error. It is not clear to me, in this case, which method has
> returned making the block that x points to no longer usable. (Maybe my confusion
> is in how data slots are assigned their values.)

This is a very good question. I am guessing here, but I would say that
the method that created the (| x = [2] |)  object in the first place is
the one that has returned. The object itself still exists and you can
send 'x' to it, but I would say that the [2] block is somewhat badly
formed.

If I type (| x = [2] |) into an evaluator and press "Get it" I see an
object with an 'x' slot that says

<a block defined in <a string>, line 1>

Looking at the block it only shows the 'parent*' slot (traits block) and
the 'value' slot (which is just 2). The block also has a slot pointing
to the enclosing lexical activation but the outliner doesn't show that.
We can evaluate 'reflect: self' in the block's outlinter to get a mirror
and then 'lexicalParent' there and the result is "mirrors deadActivation
on <a dead activation>)".

-- Jecel


More information about the Self-interest mailing list