Rest – How is reactive logic programming different from functional programming

functional programmingprogramming-languagesrest

As Reactive Programming model is perfectly suited to address the change propagation required for transaction processing, that is, when the server receives change (Insert, Update, or Delete) requests. The key approach borrows heavily from Domain Driven Design to provide declarative Domain Logic. But how does it differ from functional programming approach?

Best Answer

From the referenced wikipedia page cited by your link, It can be said that functional approach is orthogonal to being reactive. From the wikipedia article follows that reactive programming can be integrated in several programming paradigms (like procedural, logic, OO or functional).

My understanding is that reactive programming is based on the concept of dataflow, meaning that variable can be built from other variables and their value is constantly updated from its "dependencies", much like what happens in a electronic spreadsheet.

So reactive programming is mostly about data and how data changes.

The functional programming model is essentially based upon the definition of functions and the composition of those to build higher level operations.

The logic programming model is based on logical statements (usually in the form of assertions or equations) and the composition of those. The program executes by finding data that satisfies the proposed logic. This is similar to using a rule engine.

Both approaches can be used to create reactive programs, which will lead to programs built upon different reasoning approach to solving a problem. This reflects on the building blocks offered by the language as can be seen reading the OP link.