Tuesday, 12 November 2013

Functional programming, immutability and the World.


In C++  if you write a cooking_meat() function it returns NOT a new piece of meat, but one with a changed state.

In Clojure we have:
  • immutability - so we get here a NEW piece of meat
In real life it'd be not a wholly new piece of meat!
  • world -> constantly changing state, we cannot understand all of the Change
  • thus -> functional programming - our unability to cope with Change, to understand the world we are living in?

No comments: