• Calender

    April 2016
    M T W T F S S
    « Mar   May »
  • Contact

    Send us press releases, events and new product information for publication..

    Email: nchuppala@ outlook.com

What is functional programming?

At its core, functional programming is about immutability and about composing
functions rather than objects. Many related characteristics fall out of this
Functional programs do the following:
  1. Have first-class functions: First-class functions are functions that can be passed around, dynamically created, stored in data structures, and treated like any other first-class object in the language.
  2. Favor pure functions: Pure functions are functions that have no side effects. A side effect is an action that the function does that modifies state outsidethe function.
  3. Compose functions: Functional programming favors building programs from the bottom up by composing functions together.
  4. Use expressions: Functional programming favors expressions over statements. Expressions yield values. Statements do not and exist only to control theflow of a program.
  5. Use Immutability: Since functional programming favors pure functions, whichcan’t mutate data, it also makes heavy use of immutable data. Instead ofmodifying an existing data structure, a new one is efficiently created.
  6. Transform, rather than mutate, data: Functional programming uses functions to transform immutable data. One data structure is put into the function, and a new immutable data structure comes out. This is in explicit contrast with the popular object-oriented model, which views objects as little packets of mutable state and behavior.