| Chapter 21: Extensions |

| 21.20. Inform 6 objects and classes

We are free to mix in I6 object and class definitions, and the I6 and I7 objects should coexist peaceably, with object-oriented code for the I6 items still functioning ("before", "react_before", "each_turn" and so forth) alongside I7 rules.

As might be expected, I7 compiles an I6 class for each kind, and an I6 object for each of its own world objects. We can meddle with its compilation process here using a further refinement of Include. For instance, the Standard Rules say this about vehicles:

> Include (- with before [; Go: return 1; ], -) when defining a vehicle.

This glues in a new property to the class compiled to represent the I7 kind "vehicle". (See the DM4 for why.) And similarly:

> Include (- has my_funny_attribute, -) when defining the hot air balloon.

Previous | Contents | Next