Skip to content
Ben Christel edited this page Dec 19, 2020 · 5 revisions

An object is a container for State. A UnitOfCode that can Access an object can also access the State it contains; however, access to the state is often mediated and controlled by Methods.

Objects can be defined recursively as follows:

Base case: A MethodClosure is an object.

Recursive case: Members of an AlgebraicType are objects if any of the Limbs of the type are objects. Thus, any type that holds MethodClosures is an object. Usually an object is represented as a ProductType where every Limb is a method.

An object ought to adhere to a few principles:

  • Assuming the Process has sufficient available memory to do its work, it should not matter exactly when an unreferenced object is deallocated. That is, garbage collection of objects should have no side effects.
  • It should not be possible for a UnitOfCode to Access the State of an object unless it has a direct reference (e.g. via a BoundName to that object. That is, there should be no SpookyActionAtADistance.

One View of objects is that they bundle together state that all becomes irrelevant at the same time.

Clone this wiki locally