Notes on Functional Programming paradigm 1: data and logic




Computer programs can be seen as data (structures, state) and logic (algorithms, behavior).


Data changes when data values (state) changes over time, logic changes mainly when different inputs lead to different computations. Just to be clear, conditionals are the most common ways to express changes in logic, and there are a whole set of ways of doing so that are equivalent to conditionals.

Programming effectively is about grouping together data and related logic and express properly the variations of the data and the variations of the logic.

The same problem can be solved by different programs, is some of them data can changes often, while in another data do not change, similarly in one of them logic can change a lot and in another one logic change very little.

Source: Implementation Patterns, Kent Beck, 2007



Print | posted @ Tuesday, November 9, 2010 8:21 PM

Comments have been closed on this topic.