Use OO & FP Together

  • In OO Computation proceeds by sending messages to objects while in FP, Computation proceeds by applying functions to values
  • Have Functional Core and Imperative Shell in your program
  • All programming is abstraction and Abstraction is simply management of complexity using Composition (of Objects and Functions) using divide and conquer.
  • OO offers us encapsulation boundaries allowing system to be divided into modules that then communicate using message passing b/w objects. FP allows us to work with immutable values and pure functions, so that behavior can be uniformly composed from simpler building blocks into reliable larger modules.
  • OO is composition at large scale while FP is composition at small scale.
  • Thinking that programming is just mathematical, ignores resource considerations. Thinking that programming is just physics, ignores computational abstractions.
  • Broad spectrum multi paradigm languages allow us to solve all kinds or problems using OO concepts and FP concepts together where applicable.
  • Learn from OO and from FP and then rise above it all.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s