Two developers, three OOPs.
At work I used to ask colleagues: what is OOP for? The answers were different every time:
- “A more convenient way to organize code.”
- “Reuse: write a base class once, then inherit from it.”
- “So the team can work in parallel and not touch each other’s code.”
- “To model the real world: a dog is a class, a puppy inherits from it.”
- “That is just how we write code here.”
There was no shared answer. A survey by Hofmeister, Siegmund and Apel (2018) shows the same picture among the classic authors: each feature is essential for one and non-essential for another.

Five pillars, one cracking box: every school pulls OOP toward its own favourite mechanism.
And these are giants in the OOP world. Alan Kay built Smalltalk. Bjarne Stroustrup created C++. Peter Wegner gave the standard formula “objects + classes + inheritance”. The Gang of Four wrote Design Patterns, the best-known book about OOP. Even the authors of the languages and the books that made OOP do not agree on what OOP is.
| Feature | Essential (+) | Non-essential (−) |
|---|---|---|
| Classes | Wegner | West |
| Uniformity (“everything is an object”) | Kay; Rentsch | Stroustrup |
| Inheritance | Wegner | Gamma et al. |
| Messaging | Kay | Wegner |
| State | Wegner | Cook |
| Encapsulation | Rentsch | Stefik & Bobrow |
| Polymorphism | Thomas | Pierce |
Look at the messaging row: for Wegner it is optional, for Kay it is the whole point. There is no agreed definition of OOP, only a shared goal — software that is easy to reuse and to maintain. That is why we start from the goal of the system, not from a list of language features.
Two developers, three OOPs. It is about people, but the problem is not in people. OOP has no agreed foundation, so every team builds its own. The MOBBLOC principles were developed for over 5 years to fix exactly this. Here is a simple story about how the old foundation fell behind practice.

Two developers, three OOPs: classes, inheritance, or messages.
Imagine that you live in a private house. On paper, your land is exactly 20 acres. But over ten years you became interested in a garden, greenhouses and a small farm. You did not notice how you started to use ten more acres behind the old fence.
In reality, your land is now 30 acres. At some point you must go to the local office, make the real borders legal, and update the papers to match what already exists on the ground.
The same story happened to object-oriented programming (OOP).
For decades, classic textbooks kept OOP inside a small fence: the four pillars of encapsulation, inheritance, polymorphism and abstraction. But real engineering practice grew out of that land long ago. Today OOP works in a different way than the old documents say:
- Go dropped classes and classic inheritance completely. It kept only composition of structs and implicit interfaces. And still, some of the largest object-oriented systems, like Docker and Kubernetes, are written in Go.
- Many paradigms inside objects: even in classic Java, C# or Python, methods already contain a functional style (lambdas,
Stream API,LINQ,map/filter, immutablerecords) and procedural code (simple scripts and loops). Developers mix paradigms inside objects, but “on paper” the project is still called strictly object-oriented. - Microservices and actor systems (like Erlang/Elixir) turned a whole process or service into one independent “object”. It has its own database and sends messages over the network. There is no virtual method table and no inheritance at all.
The real “land” of OOP already covers all 30 acres. The textbooks still redraw the old fence of 20 acres. It is time to make reality legal and write down a new theoretical foundation for OOP.

The papers say twenty acres. The land you actually use is thirty.
But first we need to understand where exactly we are, and which stage of development OOP is in. Thomas Kuhn will help us here.
In 1962, the physicist and historian of science Thomas Kuhn published a book that changed our view of how knowledge grows. In “The Structure of Scientific Revolutions” he showed that science does not grow smoothly, by simply adding new facts to a common pile. It moves in jumps, through crises and paradigm shifts.
First, an old model of the world works well for decades. Then anomalies start to collect at its borders. An anomaly is a fact that the model cannot explain and cannot fix. When there are too many anomalies, a crisis begins, and a new, deeper paradigm replaces the old picture of the world.
Object-oriented programming is going through such a crisis right now.
If you read the first part of this series, you remember that we compared OOP with medieval Gothic cathedrals. People built them by practical rules, long before structural mechanics existed. And those cathedrals still stand today.

The cathedrals were built by rules long before anyone could calculate them.
OOP works in much the same way. Today the four pillars are a set of practical engineering rules with no strict scientific base. Still, the systems built on them do work.
Relational databases have Codd’s relational algebra. Functional programming has Church’s lambda calculus.
But OOP has no single scientific theory. Instead of one theory, it has a patchwork of “four pillars”. On closer look, these pillars are not one system. They are a cargo cult of engineering mechanisms: people copy useful habits, but there is no scientific reason behind them.
In part one we made three important steps:
- We defined the main goal of OOP again. It is not the vague “managing complexity”. It is designing, building and evolving complex systems.
- We found the scientific foundation of OOP: cybernetics, the science of control, communication and feedback in complex systems.
- We named the main design principle for complex systems: split the system into black boxes, and describe the messages they exchange.
Now it is time to move from criticism to construction.
In this article we build a complete system of principles called MOBBLOC, based on cybernetics. It will serve as a new foundation for OOP. It will also help system analysts, architects and programmers to build better systems and to write technical requirements in the AI era.
Paradigm shift and a common vocabulary
Where we are: five stages of OOP by Thomas Kuhn
Before we rewrite the theory of object-oriented programming, it helps to know where we are in its development. Kuhn’s scale fits well here. It works like a navigator in the fog of industry debates. This is how OOP has developed from the very beginning:
The pre-scientific period (the 1960s). Separate experiments. In Norway, Kristen Nygaard and Ole-Johan Dahl create Simula, a language for modelling complex systems. In the USA, the first sketches appear of what will later become Smalltalk, where objects talk to each other by messages. Nobody yet fully understands what an “object” is and where its borders are.
Normal science (the 1970s and 1980s). In Kuhn’s terms, “normal science” is a calm period. The main debates about basic concepts are over. The community now shares one picture of the world and clear rules. Engineers no longer argue about what an “object” is. They take the ready paradigm and solve practical tasks with it.
The symbol of this period is Smalltalk-80. In it, Alan Kay gives his famous biological view: objects are like living cells. They hide their internal state and exchange messages. It is important to see how Smalltalk differed from its predecessor, Simula:
- Simula saw an object as a data structure with procedures attached to it. It was a convenient way to describe a thing from the real world and to build a hierarchy of classes through inheritance.
- Smalltalk put communication and isolation in the centre, not classes and hierarchies. Here an object is an independent black box with late binding (the method is chosen at run time, not at compile time). You cannot reach inside it. You can only send it a message.
What did this lead to? It sounds strange, but exactly in this period of “normal science” OOP got a hidden fork. The industry accepted the term “object-oriented programming”, but mostly followed the Simula path (through C++ and later Java). It took classes and inheritance and pushed the idea of message passing into the background. While systems were still small, this worked very well. And this success prepared the ground for the next stage: dogma.
Success and dogma (the 1990s and 2000s). The industry chooses the Simula branch. Instead of looking at how objects talk to each other and form systems, it looks at the internal structure of objects. This is why OOP today looks less like a separate, unique paradigm, and more like a convenient way to organise code.
In this period C++ (1985) and Java (1995) became mainstream and defined the shape of modern OOP. Textbooks add the “four pillars of OOP”, the SOLID principles and the “Gang of Four” (GoF) pattern catalogue. OOP is used in a huge number of projects. But step by step it turns into a dogma, and few people understand its real basis. Unlike functional programming, OOP has no clear answer to the question: which science does it stand on?
Anomalies collect (the 2010s). Cracks appear in the strange but still tidy picture of OOP. Joe Armstrong, the creator of Erlang, states his famous “gorilla with a banana” problem:
“Because the problem with object-oriented languages is they’ve got all this implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle.”
Functional programming with pure functions starts to win on predictability and testability. Many people move from OOP to FP, or mix OOP with FP, as in Scala.
Crisis (the 2020s — right now). Modern languages and the industry openly drop the classic dogmas of OOP:
- No inheritance in Go: the language removed class hierarchies. It kept only composition and structural typing of interfaces (a type fits by its shape, not by its name). The rule composition over inheritance became the norm.
- Java and C# evolve: even the main supporters of “old” OOP add
recordtypes for passive data, pattern matching and functional constructs. - Microservice architecture: a whole service became one big “object” with isolated state and network messages.
- Data-Oriented Design and ECS: in game development and high-load systems, classic object hierarchies were replaced by ECS for speed.
The old rules no longer explain reality, and there are no new rules yet.
Today we are exactly in the crisis stage. There are too many anomalies to ignore them, but the industry has not accepted one paradigm that explains them.

Normal science, then anomalies, then crisis. The next step is not built yet.
The next step by Kuhn is a scientific revolution and a paradigm shift. The MOBBLOC principles are formulated for this shift. Their job is to replace the four famous pillars in the foundation of OOP and to put cybernetics there as its scientific base.
Agreeing on terms
Most debates about OOP end with nothing, for one simple reason: the people in the debate never agreed on terms. Let us fix that and speak the same language. Here are three basic concepts:
- Paradigm — a set of unique principles that solve a certain set of tasks. For OOP, the task is to design, build and evolve complex systems. The principles that solve this task are formulated in this article.
- Principle — a fundamental law, or a statement about what exists inside the paradigm. A principle does not depend on the programming language. It stays true in C, in Java and in a microservice, if we speak about OOP and about building complex systems.
- Mechanism — a concrete engineering tool, a syntax construct, or a technical implementation of a principle in a concrete environment. The keywords
class,privateandextends, virtual method tables (vtable), Go interfaces and RabbitMQ queues are all mechanisms. Each of them implements some principle of the paradigm.

Paradigm below, principle in the middle, mechanisms on top.
When the industry mixes these three levels, hot debates start.
Some people call inheritance a “fundamental principle”, although it is only one mechanism for the internal structure of an object. Others think that without the class keyword there is no OOP. But you can write a working object-oriented system in plain C, with no classes at all. A separate article in this series will be about the different types of OOP.
These principles are universal
Here we make a bold but testable claim. The principles below are not tied to the syntax of Java, C# or C++. They are universal along two axes.
First, along the software stack. They work at the low level of systems programming in C (through structs with function pointers and opaque handles), in high-level managed runtimes like the JVM or .NET, and at the level of distributed services.
Second, by the nature of the system itself. These are design laws for any complex system. With them you can design not only a distributed billing system, but also the structure of a company, or a factory with its workshops, warehouses and quality control departments. Cybernetics studies control and communication. It does not care whether the signals travel over a PCIe bus, over the gRPC protocol, or as paper documents between company departments.
The OCM model: Object, Component, Message
Before we formulate the MOBBLOC principles, we must answer one uncomfortable question. This question has ruined many projects in Java, C# and other languages: what in an object-oriented system should be an object, and what should not?
The classic mainstream of the 2000s taught developers a dogma: “everything is an object”. As a result, simple data structures, numbers, configs and strings were packed into heavy classes with pointless wrappers. This produced tons of boilerplate code (repetitive code with no real work inside) and blurred the borders of responsibility.
In the cybernetic approach we drop this dogma. An object-oriented system is built on the triad OCM: Object, Component, Message. The main thesis of this model is simple:
Not everything in an object-oriented system has to be an object.
In this triad, each entity has its own strict role:
- Object — an active entity. It has behaviour that matters for the application and it controls its own state. Only the object is a “black box”: its internal structure and state are hidden, and its behaviour is started from outside only by messages. The state can also be trivial. A service with no memory, which answers every request by the same rules, is an object too, because it has behaviour and a boundary.
- Component — a passive carrier of data with no behaviour of its own (for example, a DTO or a configuration structure). It is a “white box”: its structure is fully open and clear to anyone who reads it.
- Message — a signal or a command that we send to an object to start its behaviour (a method call, an HTTP request, an event in a queue). A message must also be a “white box”, with a clear format that both sides understand.
For example, in Java, C# or TypeScript, both a component and a message can be written as classes, record types or DTOs. Technically they are ordinary objects in memory. But as long as they stay fully transparent data structures, in the OCM model they are still “white boxes”.
So the entities of an object-oriented system have this semantics:
Object — black box Component — white box Message — white box

The object is closed. The component and the message are open.
The boundary rule: data by value, objects by handle
Here we must fix one condition. Without it, the whole OCM model falls apart. A “white box” means “transparent for reading”, but not “open for writing”.
A component or a message that crosses the boundary of a black box must be immutable, or it must be passed by value / as a deep copy. A mutable component must not leave the borders of its own black box.
Why is this critical? Imagine a classic “live” ORM entity. One service puts it into a message and sends it to another service. If both objects hold a reference to the same mutable instance, they get shared memory in practice. One object changes a field, and the second one sees the new value without noticing it. There was no message at all. The state leaked through the back door of reference aliasing. Formally we have two black boxes. In reality we have one common mutable lump, and the isolation that the whole paradigm was built for is broken.

Two boxes holding one mutable object are one box, whatever the class diagram says.
This gives us a practical rule:
- Inside a black box, components can be anything, including mutable ones. This is its private business, its own hidden state.
- At the boundary, a component must become an immutable snapshot (a
record, a value, a deep copy, a serialised buffer). A “live” ORM entity, tied to a session and lazy proxies, is not given out. What goes out is a DTO snapshot of its data. - Another black box crosses the boundary only as an opaque handle: a payment gateway, a connection pool, a repository. You cannot copy it by value, and you do not need to. What travels is an address. You can send messages to that address, but you cannot read or change someone else’s memory. This is exactly what dependency injection does: a handle to a neighbour arrives in the constructor, not the neighbour’s insides.

The original stays inside. Only the copy crosses the wall.
Note that networks and operating systems have followed this rule for a long time, in a natural way. JSON over HTTP, Protobuf over gRPC, a buffer in write() — all of this is a copy by value. The receiver gets its own copy, not a reference to someone else’s memory.
This rule is not a “good habit”. It is part of the OBB principle, and we will look at it separately below.

Dependency injection hands over an address, never the contents.
Now let us see how this works in real examples.
OCM example: a file and the operating system
To make the OCM model concrete, let us look at something almost every programmer meets every day: working with a file on disk.
Where is the object here, where is the component, and where is the message?
Many people will say by habit: “A file is an object, it has read() and write() methods.” From the point of view of cybernetics, this is wrong. The file itself on the disk is a set of marked blocks on an SSD, or a data structure in the file system. It does nothing by itself. It cannot decide who gets access, when to flush a buffer to disk, or how to update an index descriptor (inode).
- Component: what really crosses the boundary — the path to the file, the buffer of bytes, a snapshot of metadata that was given out. This is passive data, a “white box”. The file itself is not given out: it lives inside the black box of the OS and is part of its hidden state.
- Object: the operating system (more precisely, the VFS subsystem and the file system driver in the kernel). It is the black box that owns state (tables of open descriptors, the page cache, locks) and implements complex behaviour.
- Messages: system calls (
open,read,write,close) that a program sends to the kernel across the boundary between user space and kernel space.
You do not put your hands into the internal structures of the Linux kernel to move a disk head or to mark a cache page as dirty. You send the black box (the OS) a transparent message (a syscall) with a component (a data buffer or a path). The kernel itself decides how to process this signal and which return code to send back.

A system call is a message, and the buffer is copied, not shared.
Components and messages can have any form: JSON, a binary buffer, plain text or a C struct. There is only one requirement. They stay open “white boxes” that you can read, validate and pass on, with no hidden side effects and no shared mutable state.
Here is an example in Java:
// 1. COMPONENT (a "white box") — passive IMMUTABLE data with no behaviour.
// The byte[] field is a reference and is mutable, so we need defensive copies
// on the way in and on the way out. Otherwise the buffer "leaks" across the boundary.
public record FileData(String path, byte[] buffer) {
// Compact constructor: we take our own copy of someone else's array
public FileData {
buffer = buffer.clone();
}
// Explicitly declared accessor: we give out a copy, not the internal array
public byte[] buffer() {
return buffer.clone();
}
}
// 2. OBJECT (a "black box") — the operating system with hidden state and behaviour
public class OperatingSystem {
// Hidden internal state (descriptor tables, page cache, locks)
// ...
// Methods are the boundary where messages arrive
public int open(String path) {
// ...
}
public byte[] read(int fd, int size) {
// ...
}
public int write(int fd, FileData data) {
// ...
}
public void close(int fd) {
// ...
}
}
// 3. MESSAGES (a "white box") — method calls that cross the boundary of the black box
OperatingSystem os = new OperatingSystem();
byte[] bytes = new byte[1024]; // the caller's own buffer
FileData file = new FileData("/var/log/app.log", bytes); // Component (immutable snapshot)
int fd = os.open(file.path()); // Message open
os.write(fd, file); // Message write with a component inside
os.close(fd); // Message close
// The reference to os is a handle to a black box, not access to its state.
// Neither os nor file shares mutable memory:
// bytes stayed with the caller, one copy is in the component, another copy is in the kernel.
The problem of “islands of state”
Why is it so important to divide the system by the OCM model? Because the main disease of large software systems is state spreading around.
In a code base, dozens of small classes hold pieces of mutable state. They exchange references and change each other through public fields or getters and setters. This creates chaotic “islands of state”. To understand why the status variable got an unexpected value, a developer must keep a graph of dependencies across thirty files in their head.
And note this: a getter that returns a reference to an internal mutable object is exactly the same hole as a public field. Formally the state is “hidden behind a method”. In reality it lives outside.

Islands of state: to understand one field you must read thirty files.
The OCM model solves this problem in a radical way: you choose the size of the black box yourself, at design time.
If the task is local, the black box can be one class, or a struct with a set of functions in a module. It locks its state inside and does not give out mutable references.
If the task is bigger, the black box becomes a whole domain module, or even a separate microservice.

You choose the size of the box. The laws do not change with it.
Everything inside the box can interact in any way. But only messages, immutable passive components and opaque handles to neighbouring boxes go out. State stops spreading across the system, because it now has clear borders. And this is built into the paradigm itself.
MOBBLOC: the new foundation of OOP
Based on cybernetics and the OCM model, we can now formulate a new system of fundamental OOP principles. Its name is MOBBLOC.
Before we list the principles, let us fix the logic that produces them. It has four steps:
- What OOP is for: its main task is designing, building and evolving complex systems.
- The science that solves this task best — that is, describes control, communication and interaction in complex systems, and stands closest to engineering — is cybernetics.
- Cybernetics stands on these principles:
- So that parts do not break each other when something changes, their internal structure and state must be isolated. They must be black boxes.
- So that isolated parts form one working system, they must exchange signals all the time, without touching each other’s memory. This is message passing.
- So that the system does not fall apart from mismatches and failures, every node must understand its neighbours’ messages and must be able to react to signals from the environment. This is the law of compatibility.
- From cybernetics we derive the MOBBLOC principles.
The abbreviation stands for:
- M — Messaging. The only legal way for objects to interact is to pass messages.
- OBB — Objects are Black Boxes. The internal structure and state of an object are fully hidden from an outside observer. The object is defined only by its behaviour at the boundary of inputs and outputs.
- LOC — Law Of Compatibility. Objects must have enough variety of reactions, and compatible protocols, both with each other and with the environment.
Now let us look at each of them in detail.
M — Messaging (message passing)
In cybernetics, control is impossible without communication. From Wiener’s definition of cybernetics — the science of control and communication in the animal and the machine — we get a direct engineering conclusion: you can coordinate the work of another part of the system only by sending it information, not by reaching into its structure. In programming, this idea lives in the concept of message passing.
In theory, message passing means that you refuse to touch someone else’s state directly. The sender does not put its hands into the receiver’s memory and does not call the receiver’s internal routines blindly. It forms a discrete signal (a message) and sends it to the receiver. The receiver itself decides how and when to process that signal.
Perhaps the clearest and most time-tested example of message passing in the real world is Linux. Its whole ecosystem inherited the famous Unix philosophy, formulated by Douglas McIlroy back in the 1970s. Its essence is three simple rules:
- Write programs that do one thing and do it well.
- Write programs so that they work together.
- Use a text stream as the universal interface.
In practice this looks like a pipeline (a pipe — the vertical bar |). Every utility in Linux has standard channels: input (stdin), output (stdout), and a channel for error reports (stderr). When you connect programs with |, the output of one program becomes the input of the next one:
grep "500" access.log | sort | uniq -c
Look at what happens. The grep utility reads the file, finds the lines with the error "500" and sends them further, to sort, which puts the result in order. Then uniq counts the repeats.
In essence, the Unix philosophy is MOBBLOC in practice. Let us read it through our model:
- Objects are Black Boxes: every utility here is an isolated process. The programs do not share memory and do not call each other’s internal functions. You do not care that
grepis written in C,sortin Rust anduniqin Python, or which algorithms and buffers are hidden inside them. You rely only on their expected behaviour. - Messaging: the only thing that connects them is messages running through
stdinandstdout. - Law of Compatibility: for black boxes to work together, they must follow a contract. Here the contract is simple: “we pass each other lines of text, separated by the newline character”.
There is also cybernetic feedback here. If a program cannot process the data, it does not break the pipeline. It sends a diagnostic message to stderr and returns a non-zero exit code. This lets the outside system (the shell) react to the failure and keep homeostasis, that is, balance in the system.
The Unix philosophy proves one thing: loose coupling and strict message interfaces work better than an attempt to build one monolithic system where everything knows everything about everything.

grep, sort and uniq share nothing but a text stream.
OBB — Objects are Black Boxes (black box theory)
The concept of a black box is one of the cornerstones of cybernetics. W. Ross Ashby developed it in detail in his book An Introduction to Cybernetics (1956). In classic science, a “black box” is a model of a system whose internal structure is either unknown or deliberately left out, because it is too complex to analyse directly. The researcher and the other parts of the system interact with it only at the boundary of inputs and outputs.
In software development this is not just a syntax rule like “hide the fields with the word private”. It is a fundamental law of how complex systems work: while an object stays a black box, its internal evolution does not break the rest of the system.
You can completely rewrite the algorithms inside, replace the data storage, or move the computation to another server. For the outside world the object does not change at all, as long as the same input messages still produce the same output behaviour.
This law has a second, less obvious half: the box must be closed not only for reading, but also for writing. If a reference to an internal mutable object goes out, the box stops being black, even if all its fields are marked private. So state isolation also includes the boundary rule we described above: data is immutable or passed by value, and neighbouring objects travel only as opaque handles.

Same contract, new engine: that is what a black box buys you.
LOC — Law Of Compatibility (Ashby’s law)
The third principle follows directly from the famous Law of Requisite Variety, formulated by the same W. Ross Ashby in 1956. In the original, Ashby showed that for stable control, the controlling loop must have at least as much variety of states and reactions as the controlled environment can produce (“only variety can absorb variety”).
In MOBBLOC, this cybernetic law becomes the Law of Compatibility:
- Compatibility between objects: for black boxes to form one system, their message protocols and their variety of reactions must cover each other. In Linux, the same text model guarantees compatibility: any console utility can read text from standard input and write text to standard output. This is why classic
grep, created back in the 1970s, works together with a Python or Go script that you wrote five minutes ago, with no changes at all. - Compatibility with the environment: an object does not live in a vacuum. It lives inside an operating system, a network and hardware. By Ashby’s law, if the environment can send the object a stop signal (
SIGTERM, a request to terminate), break the network on a timeout, or report a lack of memory, and the object has no reaction to these signals, the system loses stability and falls apart.

An empty cell in the reaction column is a bug you have not met yet.
One of the clearest examples of compatibility with the environment is graceful shutdown. Here you can see the two-sided nature of the Law of Compatibility: the contract exists not only between objects, but also between the object — the black box — and the operating system.
We must design our object so that it takes into account the messages that its environment can send:
- On the object’s side: it must catch the
SIGTERMsignal, finish its current tasks cleanly, flush buffers to disk, close connections and free resources. - On the environment’s side: it must give the object reasonable time to finish, before it uses force.
And most importantly: the object must be designed so that even sudden death (a SIGKILL, the OOM killer (the kernel kills a process when memory runs out), or a power loss) does not break the balance of the whole system. Atomic operations, idempotency (the same request done twice gives the same result), and WAL journals (write-ahead logs) are all ways to guarantee that a black box leaves no “dirt” behind that would break the balance of the environment.
This is pure cybernetics. The balance (homeostasis) of the system is kept not because every object knows everything, but because every object respects the contract with its environment and is designed with the assumption that it can be stopped at any moment.

The environment promises time to finish; the box promises to finish in time.
So, if we decide to use OOP and the MOBBLOC principles, we must first design the interaction between objects, and the interaction of these objects with the runtime. We must keep in mind that we are building a complex system. Otherwise, using OOP makes no sense.
If you are not building a complex system, procedural programming is quite enough. It is also worth understanding that OOP is a separate, unique paradigm, and not just a convenient way to organise code.
Next we will see what to do with the four pillars of OOP and other programming mechanisms, and where they stand in relation to the MOBBLOC principles.
Principles versus mechanisms
Let us recall the terms from the beginning of the article. What is the difference between a principle and a mechanism?
- A principle is a universal law of system design. It does not depend on the programming language or the runtime.
- A mechanism is a concrete technical tool that puts the principle into code or infrastructure.
The difference between a principle and a mechanism is like the difference between the law of the lever and a concrete tool. The physical law itself does not change: the longer the arm, the less force you need. But you can implement it in very different mechanisms, from a simple crowbar and scissors to a complex car gearbox.

One law, many tools. MOBBLOC is the law; the pillars are tools.
So MOBBLOC is the most general set of principles for building complex systems.
Encapsulation, polymorphism, inheritance and abstraction are concrete engineering mechanisms that implement them. And mechanisms are not limited to these four pillars; there are more of them.
With MOBBLOC you can build any complex system. For example, you can design a factory with five departments and their interaction.
For software development, MOBBLOC gives system analysts, architects, managers and developers the most general principles for designing complex systems.
So MOBBLOC is the level of principles. Black boxes, message passing and the law of compatibility set the principles for building a complex system.
And what happens to the famous “four pillars of OOP” (encapsulation, inheritance, polymorphism, abstraction)? We do not throw them away. We simply move them from the level of the OOP foundation to their proper place: the level of mechanisms, next to other engineering tools.
LEVEL OF MECHANISMS (languages, syntax, runtimes, infrastructure)
+--------------------------------------------------------------------------+
| The "four pillars of OOP": |
| • Encapsulation • Abstraction • Polymorphism • Inheritance |
| |
| Other mechanisms that implement MOBBLOC: |
| • Interfaces (Go), traits (Rust), protocols (Swift/Obj-C) |
| • Composition and delegation, closures, mixins |
| • Opaque pointers in C, module privacy, defensive copies |
| • ADT / sum types, static and structural typing |
| • Channels (Go chan), queues (Kafka/NATS), actors (Erlang), syscalls |
| • OS signals (SIGTERM), timeouts, circuit breakers |
+--------------------------------------------------------------------------+
^ ^ ^
| implement | implement | implement
LEVEL OF PRINCIPLES (universal MOBBLOC laws)
+-------------------+--------------------------+---------------------------+
| M: Messaging | OBB: Black Boxes | LOC: Law Of Compatibility |
| (message passing) | (objects are black boxes)| (law of compatibility) |
+-------------------+--------------------------+---------------------------+
^ ^ ^
| based on | based on | based on
FOUNDATION (scientific basis and paradigm)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Cybernetics (Wiener, Ashby): feedback, homeostasis, emergence
Paradigm: a complex system as a network of interacting black boxes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If we look at the level of mechanisms more widely than the usual Java or C++ textbooks do, we see that every MOBBLOC principle stands on a rich set of concrete tools:
Mechanisms of principle M (Messaging): besides polymorphism through virtual method tables (
vtable), these are interfaces in Go (with structural typing and no explicitimplements), traits in Rust, duck typing, channels (chan) and actor mailboxes (Erlang/Elixir), the Observer / Pub-Sub pattern, and also system calls (syscalls), gRPC and message brokers (Kafka, NATS, RabbitMQ), and the CQS/CQRS pattern.Mechanisms of principle OBB (Black Boxes): besides classic
privatefields, these are opaque pointers (the Pimpl idiom in C/C++), module privacy (pub(crate)in Rust, unexported identifiers in Go packages), closures that hide state inside the lexical environment of a function, immutable structures and defensive copies (passing by value), and at the system level, OS process isolation and containers. Inheritance lives here too, next to composition and delegation. They are also mechanisms for the internal structure of a black box.Mechanisms of principle LOC (Law of Compatibility): these include algebraic data types (ADT /
enum/Result), which force you at compile time to handle every possible answer, contract schemas (Protobuf, OpenAPI, JSON Schema), and tools for compatibility with the environment: OS signal handlers (SIGTERM), timeouts, rate limiters and circuit breakers.
Reading the “four pillars” again
If we look at the old four pillars through the lens of MOBBLOC, all the confusion disappears at once:
- Abstraction and Encapsulation are not two different “pillars”. They are two sides of the OBB principle (Black Boxes). Abstraction defines the outer boundary of the box: which stimuli it accepts and what it promises at the output. Encapsulation physically protects its internal state from direct interference from outside.
- Polymorphism is not the magic of virtual method tables. It is a concrete mechanism that implements the Messaging principle. It lets the sender send the same message to different black boxes without knowing their internal structure. This can be dynamic dispatch in Java, interfaces in Go, traits in Rust, or URL routing in an HTTP gateway.
- Inheritance is not a fundamental principle of OOP at all. It is only one particular tool for building the insides of a black box and reusing code. Inside, a black box can be built on classic inheritance, on composition, on higher-order functions, or on a state machine. The outside world does not care.
When a paradigm is built on clear goals (creating complex systems) and scientific principles (cybernetics), and not on particular engineering mechanisms, the endless debates about “is Go or Rust really OOP” disappear.

The four pillars move down to the level of mechanisms; three principles take the foundation.
If a language has a way to create black boxes that start their behaviour through message passing, then that language is object-oriented.
A whole article in this series will be about the types of OOP based on the MOBBLOC principles. A small spoiler: even C is object-oriented.
Why these principles matter in the AI era
You may have a question: why return to the cybernetics of the 1950s and rethink OOP exactly now, when neural networks write code themselves?
Today the role of the developer is shifting. Because of AI, we less and less often need to write the implementation of every single function by hand. The main job becomes designing the whole system and setting clear borders for its parts.
And here the main gap of the old approach becomes visible: in classic OOP, building and evolving complex systems is not even stated as the main goal. And the famous “four pillars”, as we already found out, are only local programming mechanisms. They give no principles for building large systems, and that is exactly what we need in the AI era. The MOBBLOC principles close this gap.
Second, there is the problem of specifications and verification (Spec-Driven Development). As we noted in the first part of this series, in the AI era the main bottleneck is not the speed of writing code. It is the ability of a human to state the task precisely and to check the result. If the architecture is built around “black boxes” with a clear message protocol (M + OBB), the specification of an object turns naturally into a set of acceptance tests. AI can generate any implementation inside the black box, in Rust or in Python. The engineer, or an automatic validator, checks it purely from outside: it sends messages and compares the answers with the contract.

The human draws the boundary, the machine fills it, the contract checks it.
By the way, Spec-Driven Development will also get a separate article in this series, with a new SDD methodology based on the MOBBLOC principles.
Third, the MOBBLOC principles give a universal foundation for building large systems, and this foundation is equally clear to everyone in the process: system analysts, managers and developers. Unlike the fine details of virtual method tables or inheritance hierarchies, these three rules are very simple. Any person can learn them easily, and the whole team starts to speak the same language. And when you write a technical requirement, this common language becomes a direct bridge to artificial intelligence: the business and the analysts describe the borders of black boxes and the flows of messages in clear terms, and the AI gets a specification with only one meaning. From it, the AI can safely generate code, and we can check that code.
In the next section we will see how the MOBBLOC principles can be formalised.
Mathematics and MOBBLOC
Before the formulas, let us agree on what we are doing. We are not proving theorems and we are not deriving laws of nature. The laws themselves come from cybernetics; what follows are requirements written in mathematics, so that natural language stops being ambiguous.
- engineering invariant — a written requirement, that is a rule we agree to test, not a law of nature we prove.
Heating engineers do not re-prove thermodynamics. They write down “the temperature in this unit must not exceed X” and then check it. We do the same with the three principles of MOBBLOC: define the object, then state what must hold for messaging, for hiding, and for compatibility.
Every symbol below is explained in one pattern: term — scientific name, that is what it means in plain words. No mathematical background is assumed.
1. The object: a black box
Before we write down rules for how boxes talk or survive failures, we need a precise way to draw the box itself — separating what the outside world is allowed to see from what stays locked inside. The anatomy of any object fits into a single tuple:
- — index, that is the number of this box, so we can tell boxes apart.
- — tuple, that is a fixed record of named parts, like a struct.
- — input alphabet, that is all the kinds of message other objects may send to this box.
- — disturbance alphabet, that is all the kinds of signal the surroundings may send it: shutdown, timeout, disconnect, low memory.
- — output alphabet, that is all the kinds of answer the box can give, including refusals and silence, counted as planned outcomes rather than as response strings.
- — state space, that is everything the box can remember between messages; it may be trivial, a single value, for a box that remembers nothing.
- — initial state, that is the memory the box starts with when it is created.
- — behaviour, that is the rule turning “current memory + incoming message or signal” into “new memory + answer”, defined for every kind in and .
- — the wall, that is the rule forbidding anyone outside to read, change or bypass the box’s memory.
Reads as: object is a black box with a visible contract — the messages it accepts (), the environmental signals it handles () and the outcomes it can produce () — backed by a hidden engine of memory (, starting at ) and transition rules (), all sealed behind a boundary ().
Three letters describe what the world may touch, three describe what it may not, and one is the rule that keeps them apart. Strictly speaking the wall is a constraint on the tuple rather than a set like its neighbours; we keep it inside on purpose, so that it cannot be overlooked when the definition is read.
Note what the tuple does not say: it never describes how the engine works. A finite state machine, a pure function, a relational database, a neural network or a whole microservice can all sit in that slot.

The tuple has three parts: what is visible, what is hidden, and the wall between them.
The size asymmetry
- — cardinality, that is how many distinguishable elements a set has.
- — infinity, that is no finite list covers it.
Finite contract outside, unbounded complexity inside. The alphabets are what we specify and test; the state space is what we agree never to look at. This asymmetry is not a compromise — it is the black-box principle stated in numbers.

Finite contract outside, unbounded complexity inside.
2. Principle M — Messaging
- — universal quantifier, that is “for every”.
- — distinct boxes, that is a box working on its own internals is not an interaction.
- — existential quantifier, that is “there is at least one”.
- — implication, that is “if the left side holds, the right side must hold too”.
- — interaction predicate, that is the fact that two boxes affect each other in any way.
- — passive data, that is all messages and components that carry no engine: readable, validatable, copyable.
- — membership, that is “is one of”.
- — message arrow, that is one box sends message to another.
Reads as: if two boxes interact at all, there is a passive message going from one to the other. No message, no interaction — that is the whole principle. The arrow shows one direction; when the influence runs both ways, each direction carries its own message.
Request–response refinement
When a pair of boxes talks in request–response mode, the second message is a reaction to the first:
- — request–response predicate, that is the fact that this pair exchanges in that mode, so the rule applies to every such pair and not merely to one lucky example.
- — happens-before, that is causal order: the left event happened strictly before the right one, and caused it.
- — request and response, that is the message asking and the message answering it.
Engineering meaning: a method call, an HTTP request, a queue event and a syscall are all the same thing here. What is forbidden is reaching into a neighbour’s memory instead of messaging it.
How to check: review every API and architectural boundary — does each interaction have a declared message? Contract tests and call tracing answer this.
3. Principle OBB — Objects are Black Boxes
This principle is already written into the tuple: it is the element , the wall. It needs no separate formula, because it is a restriction on everything else rather than a quantity of its own.
The wall forbids three moves, and all three matter:
- Looking in — reading the memory of another box, that is a getter handing out an internal collection or a public field standing in for a message.
- Reaching in — changing it without a message, that is a mutable object passed along inside a payload and then edited by the receiver.
- Going around — bypassing the boundary altogether, that is shared globals, a common file or a database used as a back door between two boxes.
The second move is the one that catches real projects:
- aliasing — two names for one thing, that is two boxes holding references to the same mutable object.
Two boxes holding one mutable DTO have memory in common even though nobody touched a private field. So the rule splits by what is crossing the boundary.
Passive data — components and messages — crosses only in one of two forms:
- immutability — cannot be edited after creation, that is a value you may read and copy but never change.
- passing by value — your own copy, that is the receiver gets independent data, not access to the sender’s.
Another black box crosses only as a handle:
- opaque handle — a reference you can send messages to, that is the name of another box which grants no access whatsoever to its memory.
A payment gateway or a connection pool is mutable, has its own state space, and cannot be copied by value — and it does not need to be. What travels is an address, not content: the receiver may send it messages and read the answers, and nothing else. This is what dependency injection actually hands over, and why passing a neighbour into a constructor does not break the wall, while passing that neighbour’s internal buffer does.
A mutable component may live inside its own box as freely as it likes. What it may not do is leave as data.
Engineering meaning: the box may be rewritten completely — new algorithms, new storage, another server — and nothing outside changes, as long as the same messages still produce the same answers.
How to check: review getters that return internal collections and mutable DTOs crossing a boundary, run static analysis for escaping references, and test that changing a copy leaves the original intact. For handles, check that the exposed type offers messaging only — no field access, no mutable getters.
4. Principle LOC — Law of Compatibility
- — variety, that is how many elements of a set you can tell apart.
- — reaction repertoire, that is the planned outcomes this box actually implements, .
- — union, that is both sets taken together.
- — greater or equal, that is “at least as many”.
- — less than, that is “strictly below”.
Reads as: the box must have at least as many distinguishable planned reactions as there are distinguishable situations reaching it — and that number must be finite.
What counts as one reaction
A reaction is not a response string. It is the whole planned outcome: what the box does with its own memory and what it sends back.
This matters because several different situations may legitimately end with the same status code. Broken schema and unrecognised garbage can both answer 400 Bad Request, yet they are two reactions: one produces a validation report and leaves the state untouched, the other writes a security log entry and leaves the state untouched. Same code, different planned outcomes — and it is the outcomes that both the output alphabet and the repertoire count, not the bytes on the wire.
And when the contract genuinely demands the same outcome for two situations, they are one class by the grouping rule below — so both sides of the inequality shrink together, and nothing is violated. The inequality forbids exactly one thing: losing a distinction the contract insists on. Four kinds of invalid input served by one undifferentiated “something went wrong” is the failure it names.
Why it is finite
The input alphabet counts contract cases, not raw bytes:
- — all raw inputs, that is every possible byte or character string that could arrive over the wire.
- — grouping, that is the sorting rule: any two inputs that demand the same outcome go into the same bucket.
- — contract classes, that is the short, finite list of distinct cases the box actually cares about.
Reads as: infinitely many raw inputs are grouped by the contract into a finite list of distinct cases .
An HTTP endpoint accepts infinitely many byte strings but distinguishes a handful of cases: valid order, unknown item, broken schema, no rights, body too large, everything else. The infinite tail collapses into one class, because the contract gives it one outcome.
The same holds for the surroundings: is a short list of classes — timeout, disconnect, shutdown signal, out of memory — not every possible way the universe can misbehave. Both alphabets are finite because a contract is something a person can write down.

Infinite raw inputs, a short finite list of contract classes.
This is also a requirement on the designer, not only on the code. If you cannot list the situations your box distinguishes, you do not yet have a contract — and without a contract there is no black box, only a pile of code.
What counts as a correct reaction
A refusal is an answer. “No”, “not allowed”, “try later”, “I already did this” and a clean shutdown all belong to the reaction repertoire. What does not belong there is an accident: a crash, a hang, or a state nobody planned for. The box is not obliged to succeed at everything; it is obliged to have a planned, predictable answer for everything that can reach it.
The law behind this is older than programming:
- requisite variety — Ashby’s law, that is the answers must be at least as varied as the situations they answer.
- homeostasis — staying steady, that is the system keeping itself inside safe limits despite disturbances.
The rule has two sides. Between boxes, the sender only presses buttons the receiver has on its panel, and the receiver answers each of them. With the surroundings, the box handles the signals the runtime can send — and the runtime, for its part, gives it time to finish before killing the process.
How to check: write the two-column list “situation → planned reaction” from the contract and cover every row with a test; two rows may share a status code, but then they must differ in what the box does. Fuzz the “everything else” class; run chaos tests for shutdown, timeouts and disconnects. An empty cell in the right column is a bug you have not met yet.
5. Status of these formulas
These expressions are not mathematical theorems. They rest on cybernetics — the black-box model and Ashby’s law of requisite variety — but in themselves they are an engineering specification of requirements, in the same sense that a temperature limit is a specification rather than a law of physics.
Real projects will still contain shared mutable state and public fields reachable without a message. That is engineering reality, and trade-offs are legitimate. MOBBLOC is the ideal these formulas describe, not a claim that any existing codebase already meets it.
What the formulas do give is precision. The tuple says what an object is; messaging says how objects may touch; the wall says what they may never touch; compatibility says that every situation must have a planned answer. From here a specification becomes a list of acceptance tests — which is exactly what we need when the implementation inside the box is written by an AI and checked only from the outside.
Many paradigms and black boxes of any size
One important consequence of MOBBLOC is the end of the holy wars between programming paradigms.
If an object is a strict black box with a message contract on the outside, what can be inside it? Absolutely anything.
Inside one black box you can write in a pure functional style (immutable structures and composition of functions with no side effects).
Inside another, you can use a good old procedural script in C, with manual memory management and inline assembly for maximum speed.
A third box may even turn out to be a proprietary compiled binary block, or a neural network.
By the MOBBLOC principles, it does not matter at all which paradigm is used inside the black box.
Only three things matter: the state does not leak out (including through mutable references in payloads), the message protocol is followed, and the law of compatibility with other objects and with the environment is satisfied.
From this we get one practical property: a system designed by MOBBLOC naturally allows many paradigms inside its black boxes. In one and the same application (or even inside one process), black boxes written in completely different paradigms and styles can live together calmly:
+----------------------------+ Message +----------------------------+
| BLACK BOX A | ---------------> | BLACK BOX B |
| Functional style: | (one shared | Procedural style: |
| pure functions, | contract) | loops, local mutation, |
| immutable data | <--------------- | plain structs |
+----------------------------+ Reply / Event +----------------------------+
^ ^
| Message | Message
v v
+----------------------------+ +----------------------------+
| BLACK BOX C | <--------------> | BLACK BOX D |
| Classic OOP: | Message | Low-level C / |
| classes, DI through | | inline assembly |
| the constructor | | |
+----------------------------+ +----------------------------+
These four objects are fully isolated from each other. The functional box knows nothing about the loops and local mutations inside the procedural module. The classic OOP box with dependency injection (DI) does not look into the inline assembly of box D. And that box has no idea how its neighbours are built. Only messages and one shared compatibility protocol connect them.

Any engine inside, as long as the boundary and the protocol hold.
Here it is important not to mix the level of the paradigm with the level of engineering mechanisms — for example, with testability. In practice, for convenient unit testing, we often pass dependencies into an object through the constructor (as in black box C), so that we can replace them with mocks. But at the level of the paradigm, this mechanism does not concern us.
The paradigm allows us to know nothing at all about what happens inside a black box, or how it gets its dependencies. All we need to know at the boundary of the system is: which behaviour to expect from it, which messages it accepts and sends, and that it is compatible both with neighbouring objects and with the runtime.
And what if these principles work not only at the level of a concrete project in Java or C++, but go beyond it? Let us try to find out.
The same laws at every level
Finally, MOBBLOC has the property of multi-level scalability. You, as the architect, choose the size of the black box yourself, depending on the task. The laws of building complex systems do not change:
- Micro level (code inside one process): a single class in Java/C#, or a struct with methods in Rust/Go. Messages are method calls, or message passing as in Smalltalk.
- Macro level (architecture of a monolith): a large domain module, or a Bounded Context in the terms of Domain-Driven Design (DDD). Inside it, dozens of classes may work closely with one database. But with the outside world the module works through a clear protocol of commands and domain events.
- Mega level (a distributed system): a whole microservice, a cluster, or an external platform. Messages travel over the network through HTTP, gRPC or broker queues. But each microservice works as a black box and starts its behaviour only through the messages that arrive.

The same three laws hold at micro, macro and mega scale.
| Scale level | What is the “black box” (Object) | What is the “white box” (Message / Component) | Examples of isolation mechanisms |
|---|---|---|---|
| Micro level | A class, a struct with methods, an actor | Method arguments, DTOs, immutable structures | private / pub(crate), modules, interfaces, traits, defensive copies |
| Macro level | A domain module, a Bounded Context (DDD) | Internal commands, domain events, ports | Facades, packages, module boundaries, in-memory event buses |
| Mega level | A microservice, a subsystem, an AI agent | HTTP/gRPC requests, Protobuf, JSON events | Containers, network boundaries, API gateways, message brokers |
How MOBBLOC differs from modular programming or “Ports and Adapters”
A reader may fairly note: “If anything can be inside a black box, and outside there is only a message contract, how is this different from ordinary modular programming in C, or from hexagonal architecture?”
The difference is fundamental, and it lies in the cybernetic nature of the entity.
- An active regulator versus a passive calculator. A module is a way to group code. It describes where the functions live. But by itself it does not describe who owns the state and who assigns the reaction. An object in MOBBLOC is an active cybernetic agent. When it receives a message, it decides itself how to process it: put it in a queue, change its internal state, refuse, or delegate. It controls its own reaction and its own resources, even if it is created and destroyed from outside.
- Monopoly on state (State Ownership). A module by itself does not forbid shared memory: in C it can easily have static state, and that is exactly why an
opaque pointeris needed there. The difference is not in having memory, but in the requirement: MOBBLOC makes state isolation a mandatory principle, not a lucky accident. An object in MOBBLOC has a unique identity and exclusively owns its mutable state. This is $Q_i$ in our definition. Nobody from outside can change it without sending a message, which the object processes by its own internal rules. - A stimulus versus a call. A function call passes control: the calling side dictates the flow of execution. Messaging in MOBBLOC is a stimulus. The sender starts the interaction, but the receiver encapsulates not only data, but also the policy of reaction to that stimulus. This is about the role, not the syntax: a method call is also a message, if the receiver defines the reaction itself and does not give out its state.
- One principle for any scale. “Ports and Adapters” is a macro-level pattern for application boundaries. MOBBLOC is a universal law that works at any scale: from an
opaque pointerin C to an actor in Erlang and to a whole microservice in Kubernetes.
So MOBBLOC is not just a “good practice for organising code”. It is a return to the original, biological and cybernetic essence of object-oriented programming: a system as a network of autonomous black boxes that interact through messages.
A warning about extremes, and what comes next
Any theory is dangerous if you apply it without a sense of measure. The Law of Compatibility in MOBBLOC is no exception. It has two traps, and engineers and other specialists who apply it can fall into both.
Two extremes in compatibility
The first extreme is too little variety (Underengineering). Here the architect saves effort on the protocol and on handling states: “This is a simple script, let us make one is_ok flag and one common catch (Exception).” The code becomes brittle, like a cast-iron rail. As soon as the business requirements grow, or an external API starts to return a new type of error, the whole system falls apart. The reason: the variety of its reactions $V(R_i)$ is smaller than the variety of real distinguishable situations $V(I_i \cup E_i)$.
The second extreme is too much variety (Overengineering). After reading popular books about OOP and patterns, a developer starts to build spaceships for the future: dozens of abstract factories, interfaces with a single implementation, universal event buses and mapping layers, where one simple function would be enough. They add reactions for every hypothetical scenario that may never happen, and they inflate the protocol $I_i$ with classes that the domain never produces. Formally, the law of compatibility does not forbid this: it sets the lower bound of variety, and the upper bound is a question of engineering judgement.
Where is the mistake? In the fact that a large number of abstractions sharply increases the complexity of managing the code base itself. The team starts to spend 80% of its time pushing one new field through seven layers of wrappers. The balance is this: the variety of your system must match the real, not imagined variety of the tasks of the domain and the environment.

Too little variety breaks the system; too much variety breaks the team.
What comes next?
In this article we laid a new theoretical foundation for OOP and for AI-driven development, in the form of the MOBBLOC principles.
We also worked through the paradigm shift, introduced the OCM triad, explained the MOBBLOC principles, and saw the cybernetics of feedback and its laws of control in complex systems working behind them.
But a theory without engineering practice stays philosophy. In the next articles of this series we will go down from the level of principles to the level of concrete implementation mechanisms in code. We will also see which types of OOP exist, based on the MOBBLOC principles, and we will develop an updated methodology for development with AI.
Conclusion and the MOBBLOC specification
If you take one main idea from this article, let it be this: MOBBLOC is not just a new basis for OOP instead of the four traditional pillars. It is a set of universal laws for designing complex systems.
They work equally well for system calls in an operating system kernel written in C, for distributed message queues in a high-load cloud, for the coordination of autonomous AI agents, and even outside software: for the structure of a large enterprise, or for the interaction of workshops in a factory.
Wherever there is a complex system that develops over time, you will have to separate active black boxes from passive data, set up transparent message exchange between them, and make them compatible with each other and with the environment.
The old basis of OOP — the four pillars of encapsulation, polymorphism, inheritance and abstraction, where everything must be an object — gives way to MOBBLOC: to a cybernetic OOP that is precise, testable and ready for the era of artificial intelligence.
For engineers who want to apply this approach in practice, or to use it as a basis for spec-driven development with AI, we have prepared formal documentation.

The drawing is the specification. The code is what the machine writes from it.
You can read the specification here:
[Link to the MOBBLOC Specification]
What this article did (short summary)
- Showed that OOP is in the crisis stage, using Thomas Kuhn’s scale: we explained why classic inheritance hierarchies and the dogmas of the 1990s no longer describe the reality of Go, microservices and AI agents.
- Introduced a common vocabulary: the levels Paradigm → Principle → Mechanism are clearly separated, and the main goal of OOP is tied to building complex systems.
- Proposed the OCM triad (Object, Component, Message): the dogma “everything must be an object” is removed. We showed how separating active black boxes from passive data (white boxes) solves the problem of “islands of state”. The boundary rule is fixed separately: passive data leaves the box immutable or as a copy by value, and neighbouring objects travel only as opaque handles.
- Formulated new fundamental OOP principles called MOBBLOC, based on cybernetics: Messaging, Objects are Black Boxes, and the Law Of Compatibility (Ashby’s law of requisite variety, applied to compatibility with objects and with the environment).
- Reinterpreted the “four pillars of OOP”: encapsulation, abstraction, polymorphism and inheritance are moved from the foundation of OOP to the level of concrete programming mechanisms, next to interfaces, traits, closures, ADTs and message brokers.
- Explained why MOBBLOC matters in the AI era: we showed how the borders of black boxes and message protocols solve the tasks of spec-driven development and the coordination of multi-agent systems.
- Gave the MOBBLOC principles a mathematical basis and its limits: an object is a visible contract, a hidden engine and a wall between them; the engine can be anything. Situations form a finite list, only passive data crosses the wall, and a planned “no” is a valid answer.
- Showed that MOBBLOC allows many paradigms and works at any scale: inside a black box there can be any paradigm (from FP and classic OOP with DI to assembly), and the model itself works equally well from the level of objects to the level of microservices.
References
- Kuhn, T. S. (1962). The Structure of Scientific Revolutions. University of Chicago Press. Wikipedia | Stanford Encyclopedia of Philosophy
- Wiener, N. (1948). Cybernetics: Or Control and Communication in the Animal and the Machine. MIT Press. MIT Press Open Access
- Ashby, W. R. (1956). An Introduction to Cybernetics. Chapman & Hall, London. The W. Ross Ashby Digital Archive (PDF)
- Kay, A. (2003). Dr. Alan Kay on the Meaning of “Object-Oriented Programming”. Email exchange / notes on messaging and biological cells. Alan Kay Notes
- Gamma, E., Helm, R., Johnson, R., & Vlissides, J. (1994). Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley Professional. Wikipedia
- Armstrong, J. (2009). Interview in Coders at Work (by Peter Seibel) — on object-oriented state and the “gorilla holding a banana” problem. John D. Cook’s analysis
- Ashby, W. R. (1958). Requisite Variety and Its Implications for the Control of Complex Systems. Cybernetica, 1(2), 83–99. — the full formulation of the law of requisite variety.
- Ashby, W. R. (1956). An Introduction to Cybernetics — selected passages: §9/19 (distinguishability is defined by the receiver), §11/11 (“only variety can destroy variety”), §11/13 (variety as the number of distinguishable variants, the example with the photographer and twenty subjects). Principia Cybernetica / Panarchy — used in the discussion of the LOC principle.
- Johannes C. Hofmeister, Janet Siegmund, Sven Apel — A Brief Survey of Object-Oriented Ideas (2018)
