September 1, 2025

Beyond OOP and the future of Developer Experience

Preface - Why are we still talking about OOP?

The era of OOP should be over. The rise of Rust, the dominance of the TypeScript and React ecosystem, the backlash against Clean Code and Robert Martin, and a broader turn toward modularity and functional design all suggest a marked shift.

Yet the evidence points in a different direction. In 2025, Object-Oriented Programming remains the dominant architecture for most software systems. Even in React, a framework built around function composition, object-oriented patterns continue to appear. In my own work, two of the last three React codebases employed OOP designs. On the backend, frameworks such as Spring, .NET, Laravel, Rails, and many Node ecosystems rely heavily on OOP conventions. The same is true in video game development. Far from disappearing, OOP continues to define the mainstream of software practice.

Many defenders of OOP assume that its critics have not worked with it extensively or do not appreciate its advantages. This is often true. People are inclined to criticize whatever approach dominates a field, even when competing approaches have the same limitations. Yet dominance carries inertia; the prevailing paradigm attracts the most productivity, human effort, and iterative refinement. Even criticisms of OOP still provide space to sharpen its paradigm.

In web development it might be difficult to imagine a backend system without drawing from OO concepts such as ORMs, IOC, root aggregates, polymorphic inheretence, classes, and abstract factories. Data architecture is largely conceived within an OOP frame of reference. Even in UI development, patterns such as MVC and MVVM presuppose some degree of object-orientation. Every Java, C#, Rails, Laravel, and (most importantly) bespoke system which conceptually lends from those leverages full-sail OOP. Many others - C++, Typescript, Python, PHP - utilize them massively as well.

This level of popularity creates a feedback loop. Alternative approaches are not fairly evaluated because they lack the maturity that only widespread use can produce, and they remain underdeveloped as a result. The outcome is a kind of monoculture, particularly in business applications, which limits our perspective on the wider space of software architecture. I’ve seen many developers conceptualize SQL as exactly 1 table = 1 model class, not even being able to consider the problem domain of object impedence mismatch until many projects later or after learning about data normalization. OOP - literally object orientation is so powerful that it has a conceptual interface over adjacent domains.

What makes OOP great? How did we get here?

To get to the bottom of why OOP is so dominant we have to understand what makes it great, where it came from, and most importantly what are some of the powerful philosophies that the OOP masters lay claim to.

Behaviors and data

The most comprehensive entrypoint of OOP is the class. Classes are not discussed enough when talking about OOP. While they concentrate nearly all of OOP’s defining features, their basic functionality is easy to gloss over.

At their core, class objects resemble state machines. They couple behavior and data. Specifically, their behavior is “dependent” (wink wink) on their data.

Data without behavior is a struct; a record at rest, an API payload, and so on. Behavior without data is a function. It is the union of the two that gives classes their meaning. The behavior of a class is varied by the state of its data.

This idea is easy to take for granted! In languages that don’t provide classes directly, the same pattern emerges.

Rust defines data through structs, but still provides a way to bind functions to those structs so they can be called in the familiar object-oriented style:

struct User {  
  name: String  
}  

impl User {  
  // Notice the explicit parameter: "&self"  
  fn greet(&self) {  
    println!("Hello, {}!", self.name);  
  }  
}  

If we wanted to be purists, we could call greet functional-style:

use crate::core::user::{User};  

User::greet(&some_user);  

However Rust acquieses. It’s kind of a pain to have to import the User namespace to call functions. So they let you call them like methods as well.

&some_user.greet()  

This exposes available actions of the data you’re working with through IntelliSense, avoids additional imports, and provides a direct API at the point of use.

Back in the day, this was my conception of OOP: orientation around objects, literally. Structured control flow using the objects available in a given scope.

A brief counter example

About a year ago I was responsible for a small TypeScript backend for a CRM system. All in all it was about 300k lines of code managing 4 other developers. Totally greenfield. In an effort to avoid the usual pitfalls of OOP, I architected the system around JavaScript modules. Business logic was grouped by file paths; for example:

lib/  
--math/  
----geo/  
------point.ts  
------radian.ts  
--date/  
----timezone.ts  

lib/math/geo/radian.ts might contain:

type Radians = Brand<'Radians', number>;  

function to_degrees(r: Radians): Degrees  

function normalize(r: Radians): Radians  

This style was simple and intuitive, and it had advantages. Everything was super modular.

But the real-world ergonomics were awkward. Using ubiquitous math functions required imports everywhere.

// In every file  
import {normalize, toCurrency} from '@lib/math'  

It also forced new developers to manually dig through libraries to understand which helper methods were available. IntelliSense provided no guidance, so they often combed wrote duplicate implementations that they had to nit out of their PR later. They were constrained by the file-system topology I had chosen.

Also barrel files. So many barrel files

Which directory system do you like more?  

/  
└── math  
    └── finance  
        └── accounting  
            └── double-entry  
/  
└── finance  
    └── double-entry  
/  
└── math  
    └── money  
        └── double-entry  

Objects are super convenient. Many modern languages still lack a true alternative.

Composition & Object Graphs

Ironically the “intellisense of the capabilities of your data” I outlined above is not how abstraction is done on real systems. In practice, it is not useful to think of objects as state machines. In fact, objects in OOP rarely contain “data” in the traditional sense at all.

Most objects exist to manage other objects. Their behavior often looks more like delegation, which in turn relies on further delegation. The result is layered encapsulation that defines cohesive boundaries.

Because dependencies accumulate, composition becomes a central concern. Developers must manage cyclical graphs, and consider how changes in business logic impact the ontology of the code. In many systems, this produces thousand-line factory functions whose sole task is assembling dependencies into the correct shape.

Although often unwieldy, this approach to dependency management is workable, and arguably inevitable. There are limits to the reduction of complexity any architecture can achieve, and object graphs are at least a serviceable way to contain it.

Handled through root aggregates or inversion of control containers, composition can also be powerful. Static behaviors are minimized, and most functionality lives inside a composable object hierarchy. When executed carefully, this produces a system in which everything is treated as an interface—composed, modular, and reusable. It’s very important to note that limiting behavior exposure exclusively through the lifecycles of objects is itself an explicit goal of OOP when practiced in a deliberate way.

I want to reiterate that last fact because I don’t think I underscored its importance.

The ultimate power of OOP is the fact that every behavior in the system can be modularized through dependency management.

That is it. If Bob Martin hired God to defend OOP in a courtroom, that is what he’d say.

Polymorphism

Polymorphism is often presented as a defining feature of OOP, but I would argue its significance is overstated. Effective OO systems tend to minimize method overriding, avoid inheritance hierarchies, and reduce reliance on runtime polymorphism.

Instead, they rely on composition with either concrete dependencies or, if absolutely needed, well-defined interfaces. Interfaces in TypeScript, protocols in Swift, and traits in Rust or PHP all provide this capability without the drawbacks of inheritance. Inheretence, when used correctly, resembles something akin to Rust’s default trait implementations.

Regardless, there’s a huge risk of overusing runtime polymorphism.

It’s sort of a bedrock variation of the expression problem. If you have something like a boss in a video game which casts some one-off behaviors, you have to either A) manage massive parts of the behavior via composed dependencies or B) write a subclass.

Option A, with composition ends up looking something like this:

class NPC {  
    constructor(  
        private TargetDecider,  
        private DamageReceiver,  
        private AttackPlan,  
    ) {}  
}  

const MrSmite = new NPC(  
    defaultMobTargetDecider(),  
    defaultMobDamageReceiver(),  
    defaultMobAttackPlan([  
        {  
            abilityName: "Warstomp",  
            type: "Active",  
            cooldown: 12_000,  
            effects: [  
                aoeStunFromUnitEffect({ duration: 3_000 })  
            ]  
        }  
    ]),  
    []  
)  

This can be good but it is extremely brittle to a certain kind of change. Which is to say the interfaces like..

TargetDecider, DamageReceiver, AttackPlan

..end up locking-in - intentionally so - the way these behaviors work. If TargetDecider and AttackPlan encode the assumption of a single target, it may be hard to build a Hydra later.

If you can override the entire behavior it is much easier:

class Hydra extends GameObject {  
    heads: number = 8  
    targets: Map<HeadIndex, UnitID> = {}  


    tick () {  
        this.setTargetsForEachHead()  
        this.attackForEachHead()  
        this.tryRegrowHead()  
    }  


    onKill() {  
        this.trySpawnBabyHydras()  
    }  
}  

Notice that the data management of the “heads” concept is trivial with inheritance.

“Sharing” data in this way with composition is not usually as robust. Because AttackPlanner depends on some knowledge about TargetDecider, you’ve created some implicit compound dependency.

Composition can have downsides too, because it always requires defining an explicit interface. When every behavior is hidden behind an interface, the code becomes difficult to follow, and debugging turns into an exercise in tracing type erasure. There are situations that justify heavy runtime polymorphism, but they are exceptional. In most systems, the benefit does not outweigh the complexity.

Testing

But perhaps the most immediately visible advantage of OOP lies in testing. Because classes encapsulate both behavior and dependencies, they provide natural seams for substitution. Dependencies can be mocked or stubbed, and each class exposes a clear contract that can be tested in isolation. This reduces the surface area of tests and makes them easier to reason about.

In practice, this scales well in large teams. A service class that encapsulates its dependencies defines a stable API to test against. Team members do not need to know the full dependency graph; they only need to exercise the contract of the class they are working with. This aligns the boundaries of the codebase with the boundaries of the tests.

The testability of OOP is not only about isolation but also about organization. Tests can mirror the object graph. A root aggregate corresponds to integration tests, service classes to component tests, and leaf classes to unit tests. This symmetry makes test suites easier to navigate and maintain, especially in enterprise-scale systems.

There are drawbacks, of course. Excessive reliance on polymorphism or deep hierarchies can make mocking brittle, and dependency injection frameworks can produce fragile tests if overused. But the core advantage remains: OOP enforces encapsulation that naturally encourages testable units of code. In contrast, code organized primarily around free functions or global modules often requires more scaffolding to isolate dependencies or simulate state. In those environments its not uncommon to have to simulate dependency mocking by directly mocking imports.

OOP: The bad parts

A quick aside with dependencies

When we talk about dependencies - such as in a backend system - it’s worth distinguishing between what I refer to as “absolute vs arbitrary” dependencies. Absolute dependencies are the external resources a program cannot function without: a database connection pool, a TCP socket pool, an environment configuration, an external API client. If a route handler for GET /posts retrieves a user’s blog posts, its true dependency is the database connection that makes the query possible.

By contrast, many of the “dependencies” in OOP codebases are artifacts of design decisions rather than fundamental requirements. A UserService might depend on a UserPostsService which depends on a PostRepository, which depends on a DbAdapter, which depends on a connection pool. Each layer is treated as a dependency because we chose to abstract the domain model in that particular way. These are arbitrary dependencies.

It isn’t a purely academic distinction. Absolute dependencies reflect the external contracts of the system, the points where our code interacts with the world. Arbitrary dependencies, on the other hand, are imposed by our architectural style. We invent them for the sake of modularity, layering, or testability. When carried too far, this proliferation of arbitrary dependencies produces heavy object graphs and deep hierarchies whose complexity has little to do with the problem domain.

Instantiating behaviors causes incorrect semantic scope

What I view as the primary flaw of OOP is the way it couples behavior to data. Behaviors and data have fundamentally different lifetimes.

This produces a mismatch. Imagine needing to instantiate new UserService(dbConnection) just to call formatUserChatMessage, a method that never touches a database connection. The method’s meaning is obscured by the lifecycle of the object it lives in. What should be a “free” behavior becomes entangled in a dependency graph.

Of course we could create a new class abstraction called UserFormatter, refactor formatUserChatMessage inside of it, and use it directly. But this type of refactor is itself the problem. The very nature of OOP creates this class of problem that function composition doesn’t have.

Joe Armstrong famously described this as “wanting a banana but getting the gorilla and the jungle.” The banana is the method formatUserChatMessage. The gorilla is the class you must instantiate to access it. The jungle is the hierarchy of services, DAOs, caches, and connections you must satisfy before the object is valid. None of this reflects the semantic scope of the behavior itself.

The result is architecture that confuses dependencies of necessity and convenience.

If two behaviors from separate domains need to interact, the problem becomes not only what behavior to call, but how to navigate the object graph that someone else designed. Some architects defend this as encapsulation. In practice, it is fragility disguised as order.

This fragility is cumulative. Teams inherit not only the object graph but the assumptions encoded in it. The development experience is effectively pegged to the weakest abstraction, which may be as innocous as a now-defunct assumption about the business logic.

Defenders might respond that trivial behaviors need not be tied to lifecycles—that static methods, for example, offer an escape hatch. But if the escape hatch is the better fit, what was gained by binding behavior to objects in the first place? Remember, dependency managed polymorhism is the main advantage of OOP. Singletons and static utilities are a betrayal of OOP’s core claim. If lifecycles are not an advantage, then OOP is adding cost without benefit.

Class scope and polymorphism creates side effects

When behavior is defined inside a class, it inherits the entire scope of that class. Changes to one method can unintentionally interact with state managed elsewhere, even if the method itself appears isolated.

Polymorphism compounds this problem. A method overridden in a subclass may depend on state differently than in its parent. Modifying the superclass risks breaking behavior across the entire hierarchy, often in subtle ways.

SOLID attempts to guard against this. The Open/Closed Principle (OCP) insists that classes should be open for extension but closed for modification, while the Liskov Substitution Principle (LSP) says that subclasses should be safely swappable for their parents. In practice, these rules forbid exactly the kinds of ripple effects described above.

But SOLID leaves a deeper question: what happens when behavior genuinely changes? When a new requirement cannot be expressed by extension alone, the only option is to modify shared code, and the same entanglement that OCP and LSP warn against ensures that those changes spread side effects throughout the system.

In long-lived codebases this is the common case. New features alter invariants, business rules evolve.

What to do instead?

Software architecture is not fixed. It evolves with languages, tools, and the problems they are applied to. As with OOP, the best development philosophies of today will look dated in a couple of decades. There is no universal truth here; “truth” is always scoped to the problem domain, and even the most fundamental problem domains change. All we can do is guide that movement toward a more durable direction.

“..and with strange aeons even death may die” - H.P. Lovecraft

The future of DX

One learning from writing this is that developer experience is inseparable from architecture. IDEs, editors, AI, and type systems do as much to shape how we structure code as abstract principles do. The popularity of TypeScript owes as much to VSCode and its seamless IntelliSense as to the language itself.

A possible future of DX might be a “best of both worlds” approach. We could write standalone module functions—like the radians.ts example—while editors surface them with the same discoverability as object methods. In other words, direction.to_degrees() and to_degrees(direction) would be semantically identical, but the former would provide the developer ergonomics we expect from OOP. The data exposes its own API, without binding that API to a lifecycle.

The same principle could extend to absolute dependencies. Imagine an environment where real dependencies—database clients, caches, message queues—are first-class citizens in the editor. Instead of chasing through factories or DI containers, IntelliSense could surface the available operations directly. This would invert the usual burden: instead of developers conforming to an arbitrary object graph, the tooling would expose the available capabilities, but in a modular and composable way.

The general trajectory is clear. Better tooling, lighter abstractions, and a focus on absolute rather than arbitrary dependencies could reduce the brittleness that OOP often creates while preserving the ergonomic strengths that made it popular in the first place.

Dependency driven development

If we think of our absolute dependencies, we gain a clearer organizing principle. Put simply: if every behavior of a class relies on the same external resources, the banana–gorilla–jungle problem disappears. And this should not be surprising: it is exactly what we mean when we use the word dependency.

And it should be said creating wrappers over real dependencies is both natural and useful. It is reasonable to abstract a database connection pool behind a repository or a client library; handing a DB’s raw socket connection to a junior developer implementing GET /users/{id} would not be responsible. But those abstractions should remain close to the resource itself. Without the underlying dependency—database, message queue, network socket—there is no backend at all.

The problem arises when abstraction drifts upward into layers that exist primarily to manage other abstractions. The proliferation of “managers,” “services,”, “clients”, and “controllers” often creates interfaces that manage little beyond the delegation of calls. By contrast, abstractions tied to concrete state are usually justifiable. A GraphicsController in an HTML5 renderer is meaningful because it directly manages the lifecycle of renderable objects. A UserService is less convincing; in many cases it is a wrapper around createUser and similar methods, functioning mainly as glue between dependencies rather than an essential contract.

The guiding principle is simple: abstractions are strongest when they organize around absolute dependencies or concrete state. The further they drift into managing other abstractions, the weaker and more arbitrary they become.

Avoid rent-seeking abstractions

The worst abstractions are the ones that extract cost without providing value. In backend systems, this often takes the form of controllers or service layers that exist primarily to enforce organizational rules.

For example, a route handler does not need to be a controller method; it can just as easily be a composed function whose dependencies are explicit. Baking it into a controller method creates implicit assumptions about middleware, or more abstractly, behavior context. Central enforcement of behavior is rarely worth the indirection it creates. Instead of hiding route handlers inside the jungle of classes and aggregates, let them declare the behaviors and dependencies they actually need. A small DI interface is enough:

export const getUserRoute = route('GET', 'users/{id}', getUser)  
  .with('user-dao')  
  .with('cache')  
  .validation(ZodSchema)  
  .auth('token')  

There is still a service resolver here, but it’s composed rather than layered, and it does not leak context. You could treat our getUser route function as a pure function. The important point is that dependencies are explicit, easy to trace, and behaviors are not coupled through unnecessary abstractions.

The contrast becomes clear in practice. While working in an OOP codebase, I needed to implement an “optional auth” strategy: if a token was present, authenticate; if not, continue. This was useful for sending session logs before a user logged in. But because authentication middleware was architected deep in the object graph, it could not be changed in isolation. Supporting the new behavior required edits across the entire authentication abstraction. A local variant became a system-wide rewrite, risking a security regression.

This is what rent-seeking abstractions do: they insert themselves to instill DRY, but couple the abstraction to the entire system.

Avoid god objects

Will the real god objects please stand up?

Architects often decry “god objects”, all the while celebrating root aggregates, service registries, and inversion-of-control containers. The difference is usually framed as one of responsibility: a god object performs too much itself, while a root aggregate delegates to other classes. But in practice the principle is the same. Whether an object executes behavior directly or coordinates through delegation, the result is a single interface that embodies the entire application’s API. That is a god object in everything but name.

Why do we tolerate root aggregates but not god objects? The answer is convenience. A single entry point makes a system easy to navigate and gives the impression of cohesion. But this convenience comes at a cost: all behavior is now mediated through one central abstraction. Dependencies become hidden behind layers of delegation, and every change to the aggregate risks subtle ripple effects.

The alternative is once again composition. Rather than enforcing a single interface, let behaviors compose directly with the dependencies they need. With our route handler example above, you can declare dependencies locally rather than giving the route a global service root. This keeps APIs small and bounded, and it ensures that no single object grows into the bottleneck of the system.

Root aggregates may appear safer than god objects, but both reflect the same architectural instinct: to centralize authority in one place. The more we can resist that instinct, the more resilient our systems become.

Understand software in complexity magnitudes

Architecture only makes sense in the context of project scope. A game engine should not be designed like a small business ecommerce site, which in turn should not be designed like an enterprise mobile app or a CLI tool. This is obvious, but it is rarely acted on.

The useful lens here is to think in magnitudes of complexity. At low complexity, the priority is clarity: declarative code that is easy to debug, test, and refactor. Most “enterprise CRUD” applications fall here. They do not need deep hierarchies or elaborate polymorphism; they need clear control flow.

At medium complexity, modularity begins to matter. Concurrency, scaling, and separation of concerns justify abstraction, but only when it directly addresses the system’s absolute dependencies. The architecture should grow in proportion to the complexity, not in anticipation of it. If behavior utilizes composition well, growing from low to medium complexity is a natural process.

At high complexity, such as with game engines, distributed systems, and compilers, different paradigms emerge. These systems deal with concurrency, memory, and state lifecycles at a scale that makes lightweight abstractions insufficient. But this is the exception, not the rule.

Rust is the best of all worlds, but just the beginning

Languages like Rust are not immune to the challenges faced when coupling behavior and lifecycles I described earlier. Function implementations on a structure can easily face the same issue. But they at least expose the coupling more explicitly. Attaching a function requires annotating ownership and mutability. A function signature that consumes a mutable borrow makes the behavior’s scope visible. In OOP, the lifecycle is implicit, and developers discover the jungle only after they’ve tried to pick the banana.

I think there’s a lot of room in programming languages to provide annotations and metadata for methods, similar to what Rust does with receiver types. Ad-hoc traits which partial apply dependencies could allow for better separation of concerns. For example, something like:

struct Player {  
  id: String,  
  first_name: String,  
  last_name: String,  
  health: u64  
  damage: u64  
}  

// Informal named trait which constrains Player only by the data it uses  
impl "DisplayUI" Player<first_name, last_name> {  
  fn display_name(&self) -> String {  
    // Can only access data in first_name, last_name  
    format!("{} {}", self.first_name, self.last_name)  
  }  
}  

let lobbyPlayer = Player<"DisplayUI"> {  
  first_name: "John",  
  last_name: "Smith"  
}  

println(lobbyPlayer.display_name())  

This could bridge the gap between formal trait interface which require more abstraction and indirection and some of the problems I outlined above. This is just a random example, but hopefully the path is clear.

Final thoughts

Most of this is an exercise is “what could be” rather than a direct criticism of The Current Thing, which today still happens to be OOP. Despite very powerful and ergonomic languages, and AI aside, I think there’s still a lot of room for improvement in DX, but it involves challenging our assumptions about software architecture instead of incremental feature adoption.



Copyright Nathanael Bennett 2025 - All rights reserved