Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Technology Trends by (55.6k points)

Can anyone tell me when should you use functional programming vs. objected oriented programming?

1 Answer

0 votes
by (119k points)
edited by

We use object-oriented programming when you have a fixed set of operations, and as your code evolves, you primarily add new things. This can be done by adding new classes that implement existing methods, and the existing classes are left alone.

We use Functional Programming when you have a fixed set of things, and as your code evolves, you primarily add new operations on existing things, unlike OOP. This can be done by adding new functions which run with existing data types, and the existing functions are left alone.

You can watch this video on Functional Programming and OOP to understand more:

Browse Categories

...