What is the difference between procedural programming and functional programming?

A functional language (ideally) allows you to write a mathematical function, i.e. a function that takes n arguments and returns a value. If the program is executed, this function is logically evaluated as needed.1 A procedural language, on the other hand, performs a series of sequential steps. (There’s a way of transforming sequential logic into functional logic called continuation passing … Read more

What is the difference between declarative and imperative paradigm in programming?

A great C# example of declarative vs. imperative programming is LINQ. With imperative programming, you tell the compiler what you want to happen, step by step. For example, let’s start with this collection, and choose the odd numbers: With imperative programming, we’d step through this, and decide what we want: Here, we’re saying: Create a … Read more