I notice that parts of the player fall under the holding relation but not the possession relation. This is doubly confusing to me: First, I thought that holding was a subset of possession, so I don’t understand why it’s possible to hold but not have something in this case.
Second, and the pertinent one to me, this can lead to some awkward results if you’re trying to work with the things the player has actually picked up (“you are carrying your head”). Shouldn’t things that are part of the player count as had but not held?
[code]The outback is in the room.
The kangaroo is a person in the outback. The pouch is a container. It is part of the kangaroo. The player is the kangaroo.
The joey is a thing in the pouch.
say “You are holding [list of things held by the player]. You have [list of things had by the player].”[/code]
Things that are part of the player certainly shouldn’t count as had, because “having” is “carrying” + “wearing” (see manual 13.4). If I recall correctly, parts are related to wholes by the “incorporating” relation.
From your example, I assume (but I might be wrong) that the verb “holds” is a synonym of “encloses”. A encloses B if either A carries B, A wears B, B is in A, B is a part of A, or A supports B.
That seems to be nearly true. As far as I can tell, holding and enclosure are near synonyms, the difference being that encloses is a transitive relation:
A holds B iff A carries B or A wears B or B is in A or B is on A or B is a part of A.
A encloses C iff 1) A holds C or 2) A holds B and B holds C.
So holding is “directly enclosing” as it were.
Perhaps the choice of names for the holding and having relations sometimes results in non-idiomatic English, but I guess that can hardly be avoided.
(Is the holding relation documented? It is used a few times in the recipe book, but I didn’t find a discussion of it.)
According to the index, one difference between holding and enclosure is that holding only relates a person to a thing, whereas enclosure relates a thing to a thing.
Which only makes things more misleading; I can see how the apparent definition of holding makes sense in the context of things (“the drawer holds a sock”), but a person holding something definitely sounds like a synonym for carrying.
Disclaimer: I both see how this relation could be useful and appreciate that there may not be a better name for it. Better documentation would indeed be nice, though–the index lists these tropes, but doesn’t define them anywhere I see. The documentation only talks about carrying, wearing, support, containment, incorporation, and possession.
Yes, I see that now. But apparently the index is wrong. At least, you can add an every turn rule that says a list of things held by the location or by the outback or by the pouch to your sample game without Inform protesting.
So the documentation leaves out the holding relation (having is the same as possession).
Basically right. Enclosure has some special cases for doors and backdrops. (Backdrops are never enclosed by anything; a door can be enclosed by two different rooms.)
The enclosure relation serves two main purposes for IF. “Things enclosed by room X” is an approximation of “things close to the player”, which might be important if you set the room on fire. And, more importantly, “things enclosed by the player” is exactly the set of things which move around the game with the player. You use it for “if the player takes X into room Y…” sorts of puzzles.
So, backdrops are not enclosed by rooms they are in, and they are not held or contained by them either.
Doors, on the other hand, can be enclosed by two rooms, but apparently they are only contained (and held) by one of them.