Skip to content

OBJECTS

ThePastor edited this page May 31, 2021 · 8 revisions

An Object is an encapsulation (or "named object), like a function, that is both code and data, but what distinguishes functions from objects is that they construct order upwards from the machine, rather than rule over the machine to perform computation.

That is, objects are architecting structure -- functions don't do that. If you are trying to do that in a function, you're doing it wrong -- you should be using OOP.

All objects should follow the Rule of Four which states that there are 4 primary functions (on 2 axiis) + and - 1 in each direction in some cases for scaling.

  • container: in, out, contains, index, size,
  • generic: in, out, get state,
  • hardware: read, write,
A non-null value should be inferable without extra code by the object, from the data environment. So, too, possibly, size as well as type of object (set of {hardware, container, inspection, generic, numeric }). Data, structs, and such remain separate and are the values passed in and out of objects. Some function in the ecosystem or object must be able to marshal or serialize this into data and tag it with the object NAME that can be used to re-animate the data into an object, likewise. In Python, STR is the function in the object while REPR is the function outside the object, provided by the ecosystem and outputs, recursively all the relevant [sub]objects until it is into a c-like struct or database-like field and write into a file. The object name should be the first line.
Clone this wiki locally