Broadly speaking the schism between imperative programming a
Solution
1. computation step:
2. functional:
3. evaluating expressions:
4. expressions
5. value
6. imperative
7. executing statements
8. sequence of statements
9 separate
Now that i have answered the fill in the blanks, let us understand the difference between the two of the most popular paradigms namely Functional Vs Imperative. With respect to the statements in the question let us take a simple example of calculating the area of a Rectangle. We know that the Area= Length * Width
In the Imperative computation model we focus on the effects on memory. So in a imperative language, the code for calculating the area will be:
Height = getHeight() /* Getting the height and \'storing\' it in a variable */
Widht = getWidht() /* Getting the width and \'storing\' it in a variable */
Area = Height * Widht /* Calculating the area and again \'storing\' it in a variable */
The same code in a functional programming will look like this:
( * getLength() getWidth() ) /* This is how its done in Lisp, a very famous functional programming language.*/
So we are not concerned with the \"effects\" on the \"memory\" here and focusing on evaluating expressions (getting width and height and multiplying them) until we get the desired value (area).
Please feel free to provide the feedback as it will help us grow!
