Make action variables (and rulebook and activity variables) globally visible
A fairly common question is why the "actor" global variable isn't usable in phrases. (E.g. https://inform7.uservoice.com/forums/57320-general/suggestions/988953--syntax-make-rules-able-to-refer-to-actors .) The answer is that "actor" is not a global variable, but an action-scoped variable.
But this is not a good enough reason. It's impossible to write a helper phrase or utility which does work based on the actor. It's also unnecessarily painful to write a response which varies based on the actor -- see forum thread http://www.intfiction.org/forum/viewtopic.php?f=7&t=19917 .
Action variables are not global variables; they get pushed stack-wise when a new action begins. This is valuable. But there is always exactly one *current* actor -- unless no action is in progress, in which case the current actor could be "nothing" or the default person-value. So referring to "the actor" in any piece of code is not ambiguous.
The same, of course, applies to rulebook and activity variables.
If making these symbols globally visible causes problems, it would suffice to make the user qualify them. E.g., you could refer to "the door gone through" in going rules, and "the door gone through of the going action" in other contexts.
Strongly support this. There needs to be a generic way to refer to "the actor" (I6) during a subroutine supporting an action or a say-phrase supporting an action, in any case.
"The person asked" in fact works, due to being defined as a synonym for I6's "actor", but is highly counterintuitive, as well as being undocumented. As long as we're relying on unnatural-language constructs, we might as well use the shorter one of "the actor".
This can almost be fixed in an extension. Maybe I'll try doing so.
Andrew Z. Plotkin commented
Possible counterargument: For rulebooks, at least, one would be tempted to "follow rulebook X" and then extract a computed rulebook variable. This would fail confusingly -- the variable gets popped away as soon as the rulebook ends.
Similarly, "actor" isn't *really* meaningful once we reach the every-turn-rules stage, but people would be tempted to rely on it anyway.