Next: , Previous: API Documentation, Up: API Documentation


2.1 Objects

2.1.1 Introduction to Objects

Sheeple is an object system completely oriented around objects. Unlike most other object-oriented systems, Sheeple does not have a separate concept of a class as a type definition mechanism that 'instances' are then created from.

Instead, Sheeple uses objects, and only objects, to define the behavior of systems programmed with it. Programs are shaped by defining properties on objects, establishing relationships between objects, copying objects, and defining how objects participate together in messages, which define behavior.

There are various ways to create new objects in Sheeple. The two core object-creation facilities are OBJECT, which creates a new empty object by default, and CLONE, which shallow-copies an existing object's characteristics.

Beyond OBJECT and CLONE, operators like MAKE and DEFPROTO provide more advanced creation facilities on top of OBJECT and CLONE, but are strictly for convenience.