ABSTRACT

This closed maps style takes yet a different perspective on the Things style explained in the previous chapters. The application is divided in exactly the same way. However, these things (aka objects) are simple maps from keys to values. Some of these values are simple data, while others are procedures or functions. In order to see these maps as objects, many conventions need to be followed. First, fields in these objects are the entries that contain simple values, while methods are the entries that contain functions. Constructors are methods that are meant to be called before any other entries. The Closed Maps style illustrates a certain flavor of object-based programming known as prototypes.