Organization-based Programming

Proposal: *

Organization-based programming = Organize agents, objects, and messages exchanged between them, to work on a goal or a process (i.e. “desired outcome”).

Inspiration:

Lemmings, DNA, construction sites, Impossible Creatures.

Definitions:

  • Agents are actors that have less predictable behavior.
  • Objects are actors than have predictive behavior.
  • Both agents and objects are actors.
  • Actors can send and receive messages.
  • Messages contain content and language. Message content, can be actors themselves (meaning code, not just data).
  • Note: No notion of “interpreters”. Interpreters are just strictly behaved objects that, given a message that is source code, executes the parts of the message on behalf of the message author, or itself (depending on privileges etc.).

Actor attributes:

  • Smartness: Smart (less predictable behavior) vs. Dumb (predictable behavior). Objects are strictly dumb actors.
  • Activeness: Active (continuously running) vs. Passive (runs when called by a thread scheduler).
  • Initiativeness: Initiative (does operations even without prior command) vs. Reactive (requires command).
  • Collaborativeness: Social (works with others) vs. Individual (does things internally)
  • Memory: Mindful (stores experience) vs. Forgetful (always have a blank state).

Example

Agent A is a view mediator. Given a message content that has data and view destination, the agent needs to modify the view so it will display data. For now, agent A only knows how to handle the DataGrid destination.

Then comes a message that specifies a ListBox destination. Agent A is “confused”, so it needs to learn how handle a ListBox destination, or “throw an Exception” (which means sending a message back to the caller, if known, or simply “yelling” or “complaining”), which may or may not force it to learn ListBox handling anyway.

Agent A starts its lifetime with a job that is handling a message of type array of specific type, and passes it to a specific view component. Over time, it evolves to be a smart agent, to be “mediator” in a higher sense, that can handle more varyings kinds of data, and more varying kinds of view destinations.However, basically, agent A is still a mediator (as its “DNA”).

Memory vs. State

In this scheme of organization, the traditional object-oriented concept of “state” is not recognized

What’s recognized is memory, which is an abstract concept of a collection of experiences. An experience is defined as a way to handle a particular message, and its outcome.

* This proposal may be considered hypothetic, fictive, ridiculous, or simply imaginary.

PS:

Possible additional attributes from MyPersonality.info Personality Tests:
There are 16 distinct personality types, each belonging to one of four temperaments as organized by David Keirsey.

Protectors (SJ)

Creators (SP)

Intellectuals (NT)

Visionaries (NF)

Preferences

Functions