Is it wise to use multiple paradigms in a C ++ project?

3

Would it be advantageous to use multiple paradigms in a project in C ++? For example, in a certain part of the code I use reactive programming , elsewhere I use OOP, and in another I use functional programming. Anyway, is there any problem in doing this? Could I come across any problems in the code in the future?

    
asked by anonymous 03.12.2018 / 01:25

1 answer

6

Knowing what you're always doing is, not knowing, using one is already a lot :) And people use all the time several of them. It is common for some teams to forbid certain patterns and partly paradigms in their code base, especially in C ++ people tend to work with a subset language.

Understand that almost all the time you are programming imperatively, wanting or not. Today C ++ has a greater capacity to be a little functional, and many are opting for this too, but it is only aid, it can not even be fully functional, a language can not have these two paradigms completely at the same time. >

It has several other secondary paradigms , and today the goal setting not only seems to be the strongest, is the trend. Object orientation is also used, but some people preach that its use is avoided. They are putting contracts, events and reactive programming, just to name a few of the secondary ones.

The problem is not to use it together, it is to use without understanding what you are doing, everything can go wrong in the future.

    
03.12.2018 / 01:34