Does the exact kind K matter at all in "A K can have an L called P"?

Note that the sentence doesn’t actually add the property P to any instances of K. To do that, it would have to be:

A K has an L called P.

but the sentence is:

A K can have an L called P.

While it doesn’t add property P to any instances of K, it still does something useful - it forward declares P as the name of a property, so it can be used where Inform expects the name of a property, even if there are no objects that provide the property:

if k provides property P:
	let l be the P of k.

But it doesn’t prevent property P from being added to or queried on objects of kinds unrelated to K.

Does it do anything at all to kind K?

Or does it not matter which kind you use in that sentence?

And is this the standard way to forward declare a property identifier?


A person can have a text called nickname.

is interpreted by the compiler as

[a thing called] person can [has] a text called nickname.

and so just actually creates an off-stage object called ‘person can’, with a nickname property.


Creating an extra object certainly isn’t what I intended to do. But it looks like there is a way to forward declare properties that might never be used. If I declare a new kind of value like this:

A property bin is a kind of value.

then any time I want to forward declare a property, I can do this:

A property bin has an L called P.

Neither sentence creates and unwanted instance of kind “property bin”, and other code can query whether any object provides property P regardless of whether any objects actually do provide it.

1 Like

I guess that one could use any of the out-of-the-box enumerated kinds of value in the same way, without even declaring a new kind. e.g.

an external file has an L called P.

although you might think that an untidy approach!