DEV Community

Discussion on: Functional Programming vs OOPS : Explain Like I'm Five

Collapse
 
jamesmh profile image
James Hickey

Why not lol:

Programming is like lego. You build stuff by stacking blocks together.

In FP blocks are functions.

In OOP blocks are classes.

That's a very rudimentary explanation 😉

Collapse
 
mfekadu profile image
Michael Fekadu

Ah yes! Wonderful!

What are the connection points between each LEGO?

Collapse
 
jamesmh profile image
James Hickey

They could be method invocations, shared state (which I don't suggest overall), asynchronous messages, etc.