DEV Community

Discussion on: OOP a software development mass psychosis

 
jwp profile image
John Peters

He's acting as if there's no IL generation. He doesn't get that we can do all of the example in one line of code. Nobody cares what IL generates. We're using 5 core GHZ processors now.

Thread Thread
 
t4rzsan profile image
Jakob Christensen

LINQ is great and it is in fact a functional paradigm. The same goes for the fairly new C# record types and switch statements. C# has been adding more and more functional capabilities.

LINQ is a great example of what @polterguy means when he says that programming is about input -> verb -> output.

The LINQ function SelectMany is usually called flatMap or collect in the FP world and it is a part of the defition of monads. So collections in C# can behave in a "monad-ish" way in C# with the addition of LINQ.

Thread Thread
 
polterguy profile image
Thomas Hansen

And we didn't even mention Action and Func yet ... ;)

 
peerreynders profile image
peerreynders

That's not the only angle.

Data-Oriented Design (Or Why You Might Be Shooting Yourself in The Foot With OOP) (2009).

Why?

Data-Oriented Design: What's wrong? — Mapping the problem:
"Object-oriented development is good at providing a human oriented representation of the problem in the source code but bad at providing a machine representation of the solution. It is bad at providing a framework for creating an optimal solution, …"

Which ultimately lead to the development of the Entities, Components, Systems (ECS) architecture.

"The most amazing achievement of the computer software industry is its continuing cancellation of the steady and staggering gains made by the computer hardware industry."
— Henry Petroski

The processor-memory performance gap (especially on commodity hardware) forced certain segments of the video games industry to abandon OOP.

This lead Unity to develop their "Data-Oriented Technology Stack" (DOTS) which introduced a C# dialect—"High Performance C#" (HPC#).

Thread Thread
 
polterguy profile image
Thomas Hansen

Brilliant walk through, thx mate :)