Aye, I thought a scope rule would be the key. As it stands, the code you’ve given me is way too broad as it would allow me to take the whimper! However, this line fixes matters:
Instead of doing anything other than listening when the noun is the whimper:
say "You can only listen to the whimper."
To decide whether any/either/a noun is (item - a thing) (this is the match either noun rule):
if item is the noun, decide yes;
if item is the second noun, decide yes;
decide no.
to write
Instead of doing anything other than listening when either noun is the whimper:
say "You can only listen to the whimper."
True. It works, but I never liked it as a solution. When the common solution for matching noun or second noun to a given item is to use objects that vary, then logically matching both at the same time should use the same syntax, not a completely different one using a completely different mechanism. IMHO, of course.
So I guess what I’m trying to say is, it feels wrong on a conceptual level as opposed to a functional one.
I don’t understand why you think that. It’s really almost equivalent to your phrase, except that it also checks the actor. (Actually it also uses block values so it might be considerably slower… I don’t think the current action variable is normally set so this will add extra processing.)
Also, To…: are phrases, not rules. So you should say
To decide whether any/either/a noun is (item - a thing) (this is the match either noun phrase):
The only reason is the evolution of the Inform library over time. The noun and second noun variables are early features (whose history stretches back to Inform 6 and 5). The current action is a recent feature that encompasses them in a more structured way.
It is possible that a future release of I7 will deprecate noun/second, or recast them to be accessors into the current action. However, there’s no urgency on that – it’s just, as you describe, a small conceptual cleanup.