This article is an excerpt from my book about Data-Oriented Programming.

More excerpts are available on my blog.


A couple of years ago, a famous composer had an illumination and he wrote a song about a world without OO.

imagine

Imagine there’s no objects
It’s easy if you try
No classes below us
Above us only information
Imagine all the entities being only data

Imagine there’s no mutations
It isn’t hard to do
Nothing to protect with a mutex
And no deadlock too
Imagine all the entities being only data

You may say I’m a dreamer
But I’m not the only one
I hope some day OO will join us
And the world will be as one

Imagine no code is locked
I wonder if you can
No need for methods and inheritance
A brotherhood of input and output
Imagine all the code being pure functions

You may say I’m a dreamer
But I’m not the only one
I hope some day OO will join us
And the world will be as one

This article is an excerpt from my book about Data-Oriented Programming.

More excerpts are available on my blog.