| Chapter 21: Extensions |

| 21.22. Inform 6 properties and attributes

I7's properties are compiled sometimes as I6 properties, sometimes as I6 attributes, sometimes as bits in a bitmap somewhere. However, we can override I7 by telling it that one of its property names is equivalent to an already-existing I6 property or attribute: if so then I7 will use that name and will not compile any directive to create it. For example:

> Switched on translates into Inform as "on".

> Initial appearance translates into Inform as "initial".

We do not need to translate "switched off", the opposite to "switched on": I7 will now compile this to "~on".

I7 is a single-inheritance system which aims to use unchanging kinds to describe function, whereas I6 has multiple-inheritance, and concepts which in I7 would be fixed over time are sometimes mutable. For example, both have the concept of "container", but in I7 this is a kind, whereas in I6 it is a mere ephemeral attribute. The Standard Rules get around this mismatch with the following trick:

> A thing can be an Inform library container. [...] A container is always an Inform library container. [...] Inform library container translates into Inform as "container".

Thus any object of kind "container" automatically gets the I6 attribute "container", without the I7 designer noticing that any property has been assigned.

Previous | Contents | End