For those still a little unsure, what Zarf is pointing out here is that when an I7 either-or property is implemented as one of the limited number of I6 Attributes (which are like universal either-or properties), every object is given that universal attribute- it’s just that if you write ‘a person can be happy’ only people are allowed to have that attribute allocated by code- such as Mr Bingley is happy or now Mr Darcy is happy. * Any object that is not a person is forever frozen in the default state of not being happy. But you can still ask about that status for objects which are not people without throwing an error- e.g. ‘If Netherfield Hall is happy’ is a valid condition, but one that can never be true.
*this is possible because although every object has a ‘happy’ Attribute, Inform keeps a separate record of which objects are allowed to have the happy Attribute modified and which are not.
If Inform 7 runs out of I6 Attributes to use as either-or properties (there are only a small number that aren’t already used up by the compiler and Standard Rules) it starts to implement them instead as normal I6 properties rather than as Attributes. When this is the case, A person can be happy creates an I6 property which is given only to person objects. Unlike the case with Attributes, any object that is not a person does not have that property at all. Now the condition If Netherfield Hall is happy throws a run-time error because not only can Netherfield never be happy, it doesn’t even have access to the concept of happiness, because it has been given no ‘happy’ property.
The sequence by which either-or properties are implemented- firstly as I6 Attributes then subsequently, when the stock of Attributes runs out, as properties- will be determined by the order that they first appear in the source or are included from extensions. So re-ordering the source code (or transferring an extension into the main source) may cause a property that was previously implemented as a property (and thereby causing a run-time error) to be implemented instead as an Attribute, such that the error disappears.
This error is peculiar to Ver 10 upwards, because Ver 9 and previous had a different method of accessing either-or properties which checked first whether an object provided a property before trying to read it, simply returning false if the property was not provided (which is the same thing that happens for objects which have unmodifiable attributes). Ver 10 skips this check and blunders in trying to read a non-existent property, throwing a run-time error.
This behaviour is easy to reproduce- see the following, which throws an error in Ver 10 but not if compiled for Ver 9.
"Attributes and Properties" by PB
A person can be happy.
A person can be lucky.
A person can be tall.
A person can be short.
A person can be rich.
A person can be poor.
A person can be rude.
A person can be polite.
A person can be famous.
A person can be obscure.
A person can be black. [up to this point, these either-or properties are implemented as I6 Attributes, hereafter as I6 properties]
A person can be white.
A person can be coloured.
A person can be sad.
A person can be unlucky.
Netherfield Hall is a room.
When play begins:
unless the Hall is happy:
say "Netherfield isn't happy.";
unless the Hall is sad:
say "Netherfield isn't sad.".