• Calender

    April 2016
    M T W T F S S
    « Mar   May »
     123
    45678910
    11121314151617
    18192021222324
    252627282930  
  • 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
style.
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.
Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: