Browse OOP reference
Paradigms in practice

Is object-oriented programming obsolete?

On this page

The answer depends on which feature earns its keep. An object that owns a file and its cleanup has a precise responsibility. A hierarchy with a subtype for every enum value might make a finite set of cases harder to inspect. Evaluate a real change request against the design.

Worked example

Python
from io import StringIO

handle = StringIO("release log")
with handle as stream:
    assert stream.read() == "release log"
assert handle.closed

Python data model

Explore class relationships in the OOP Playground

What is object-oriented design?What is object-oriented programming?What is object identity?

All OOP questions

Search ObjectFAQ