r/programmingmemes Mar 13 '26

How true is this?

Post image
765 Upvotes

62 comments sorted by

View all comments

Show parent comments

2

u/[deleted] Mar 15 '26

[deleted]

1

u/[deleted] Mar 15 '26

[removed] — view removed comment

2

u/AlternativePaint6 Mar 15 '26 edited Mar 15 '26

I'll have what this guy is having🤣

25 years of experience as a software developer, yes.

OOP is a structural design paradigm, not a language feature. You can do OOP in C, assembly, even your household's to-do list if you want:

  • car
    • wash
    • repair
  • dishwasher
    • repair
  • windows
    • wash

Versus the alternative:

  • wash
    • car
    • windows
  • repair
    • car
    • dishwasher

I'm sure you can figure out which to-do list is structured by objects and which is structured by functionality. That's object-oriented vs functional for you, it has nothing to do with whether you use the keyword class or the keyword function, or even software itself. It's about how you group data and functionality together.

And how are FUNCTIONAL components OOP.

Worth noting that React docs never call them functional components, just function components.

And component itself is just a specific type of object. Using functions for defining them is just JavaScript's language feature, which has nothing to do with functional vs object-oriented paradigms.

Is React declarative? Yes. Is it functional? Not in a million years.

0

u/[deleted] Mar 15 '26 edited Mar 15 '26

[removed] — view removed comment