API - LeFreq/Singularity GitHub Wiki

STUB: this has been revised. Every object derives from about 5 base objects.

There is a single API for every object exercising three dimensions of interaction:

  1. Lateral, data-passing dimension:
    1. message flow: send/receive; >>, <<
    2. identity: object NAME/get state (single word limit...?); CamelCase, ??Object or ?Object.
  2. A high-level, control-flow dimension and syntax, which could possibly replace exception handling, going up and down:
    1. swear: tells environment that result will be within expectations
    2. implore: checks all inputs against object/method constraints (can be turned off when trust builds from application)
  3. A low-level system-control dimension:
    1. run (or call): 1, or RUN
    2. clone object: %
The ecosystem itself provides edit/save object abilities, and test/query-object (python's help) abilities.

STUB: regarding object APIs: Functions can have naked RETURNs, but objects should have SWEARs, giving close-ended documentation on the object's limits. The ecosystem also creates a programmer economy with needs/requires statements. These statements can be refined, much like pair programming can be used to build an application by erecting test harnesses that go up and down the architecture.

NOTES:

  • Needs: these could be runnable tests, telling other programmers what kind of object in the ecosystem is desired.
  • Requires: These could also be runnable tests, or some kind of syntax for type testing, range testing, what else?
⚠️ **GitHub.com Fallback** ⚠️