Old timey "Use with" Inform7 command syntax

I think it’s worth using the headings no matter how small your game, because the divisions introduced into your code are not simply cosmetic. If the compiler finds a reference ambiguous, it tries to reconcile the matter by looking at candidates in the local “code area” first: i.e. first that “section” then the “part” which contains that section, then the chapter in which that section occurs, then the book in which that chapter occurs and so on up the hierarchy. (I may not have got the hierarchy quite right - I always have to look up the headings every damn’ time!)

Anyway - imagine your game starts out:

The tent is a room.
The camp bed is an enterable supporter in the tent.

… and then a couple of deserts and a city later…

The harem is a room.
The divan bed is an enterable supporter in the harem.
The fluffy cushion is on the bed.

If you’ve used headings, then the compiler will (probably) be able to guess that it’s the divan bed that you mean, and not the camp bed way the heck the other end of your code.

(Having said that, my personal preference is to always type object names out in full. I don’t mind my source code being verbose and repetitive, so long as it’s clear.)

1 Like