Showing posts with label imperative programming. Show all posts
Showing posts with label imperative programming. Show all posts

Monday, 26 August 2013

What is functional/declarative programming versus imperative programming?

Imperative Programming 

is what most professional programmers use in their day-to-day jobs.
It's the name given to languages like C, C++, Java, COBOL, etc. In imperative programming, you tell the computer what to do. "Computer, add x and y," or "Computer, slap a dialog box onto the screen." And (usually) the computer goes and does it. This is where most of us spend our lives, in looping structures and if-then-else statements and the like.

Functional Programming

it seeks to describe what you want done rather than specify how you want something done..
It's probably best understood in contrast to imperative programming.